From 39e13efc0847bafdb1f176a5c2e0970170e683b0 Mon Sep 17 00:00:00 2001 From: alperak Date: Tue, 5 Mar 2024 13:12:29 +0300 Subject: python3-freezegun: add recipe and add ptest FreezeGun is a library that allows your Python tests to travel through time by mocking the datetime module. * Tested on qemux86-64 and qemuarm64 * Add ptest into PTESTS_FAST_META_PYTHON Ptest result: ============= qemuarm64: Testsuite summary TOTAL: 127 PASS: 121 SKIP: 6 XFAIL: 0 FAIL: 0 XPASS: 0 ERROR: 0 DURATION: 20 END: /usr/lib/python3-freezegun/ptest 2024-03-05T06:53 STOP: ptest-runner TOTAL: 1 FAIL: 0 qemux86-64: Testsuite summary TOTAL: 127 PASS: 121 SKIP: 6 XFAIL: 0 FAIL: 0 XPASS: 0 ERROR: 0 DURATION: 21 END: /usr/lib/python3-freezegun/ptest 2024-03-05T06:57 STOP: ptest-runner TOTAL: 1 FAIL: 0 Signed-off-by: alperak Signed-off-by: Khem Raj --- .../python/python3-freezegun/run-ptest | 3 +++ .../python/python3-freezegun_1.4.0.bb | 29 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-freezegun/run-ptest create mode 100644 meta-python/recipes-devtools/python/python3-freezegun_1.4.0.bb (limited to 'meta-python/recipes-devtools/python') diff --git a/meta-python/recipes-devtools/python/python3-freezegun/run-ptest b/meta-python/recipes-devtools/python/python3-freezegun/run-ptest new file mode 100644 index 0000000000..8d2017d39c --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-freezegun/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/meta-python/recipes-devtools/python/python3-freezegun_1.4.0.bb b/meta-python/recipes-devtools/python/python3-freezegun_1.4.0.bb new file mode 100644 index 0000000000..15c0bf06ba --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-freezegun_1.4.0.bb @@ -0,0 +1,29 @@ +SUMMARY = "FreezeGun is a library that allows your Python tests to travel through time by mocking the datetime module." +HOMEPAGE = "https://github.com/spulec/freezegun" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=acf1d209bb6eddae4cbe6ffd6a0144fe" + +SRC_URI[sha256sum] = "10939b0ba0ff5adaecf3b06a5c2f73071d9678e507c5eaedb23c761d56ac774b" + +inherit pypi python_setuptools_build_meta ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-sqlite3 \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} = "\ + python3-asyncio \ + python3-dateutil \ + python3-unittest \ +" -- cgit v1.2.3-54-g00ecf