python3-freezegun: add recipe and add ptest
PATCH 1/1 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 <[email protected]>
--- .../ptest-packagelists-meta-python.inc | 1 + .../python/python3-freezegun/run-ptest | 3 ++ .../python/python3-freezegun_1.4.0.bb | 29 +++++++++++++++++++ 3 files changed, 33 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
meta-python/conf/include/ptest-packagelists-meta-python.inc +1 -0
@@ -17,6 +17,7 @@ PTESTS_FAST_META_PYTHON = "\ python3-click \ python3-dominate \ python3-execnet \ + python3-freezegun \ python3-geojson \ python3-gpiod \ python3-gunicorn \
meta-python/recipes-devtools/python/python3-freezegun/run-ptest new file +3 -0
@@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake
meta-python/recipes-devtools/python/python3-freezegun_1.4.0.bb new file +29 -0
@@ -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 \ +"
Signature · 1 line
2.25.1