summaryrefslogtreecommitdiffstats
path: root/meta-python
diff options
context:
space:
mode:
authoralperak <alperyasinak1@gmail.com>2024-03-05 13:12:29 +0300
committerKhem Raj <raj.khem@gmail.com>2024-03-05 11:02:04 -0800
commit39e13efc0847bafdb1f176a5c2e0970170e683b0 (patch)
treeebbda0b0ae1edf639c525c042f9a6db566973231 /meta-python
parent0776d3b4e7b0a3d13b755897d1a7ecf3819bf286 (diff)
downloadmeta-openembedded-39e13efc0847bafdb1f176a5c2e0970170e683b0.tar.gz
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 <alperyasinak1@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python')
-rw-r--r--meta-python/conf/include/ptest-packagelists-meta-python.inc1
-rw-r--r--meta-python/recipes-devtools/python/python3-freezegun/run-ptest3
-rw-r--r--meta-python/recipes-devtools/python/python3-freezegun_1.4.0.bb29
3 files changed, 33 insertions, 0 deletions
diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc
index 3b19152f4..65a45c4b6 100644
--- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
+++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
@@ -17,6 +17,7 @@ PTESTS_FAST_META_PYTHON = "\
17 python3-click \ 17 python3-click \
18 python3-dominate \ 18 python3-dominate \
19 python3-execnet \ 19 python3-execnet \
20 python3-freezegun \
20 python3-geojson \ 21 python3-geojson \
21 python3-gpiod \ 22 python3-gpiod \
22 python3-gunicorn \ 23 python3-gunicorn \
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 000000000..8d2017d39
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-freezegun/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3pytest --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 000000000..15c0bf06b
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-freezegun_1.4.0.bb
@@ -0,0 +1,29 @@
1SUMMARY = "FreezeGun is a library that allows your Python tests to travel through time by mocking the datetime module."
2HOMEPAGE = "https://github.com/spulec/freezegun"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=acf1d209bb6eddae4cbe6ffd6a0144fe"
5
6SRC_URI[sha256sum] = "10939b0ba0ff5adaecf3b06a5c2f73071d9678e507c5eaedb23c761d56ac774b"
7
8inherit pypi python_setuptools_build_meta ptest
9
10SRC_URI += " \
11 file://run-ptest \
12"
13
14RDEPENDS:${PN}-ptest += " \
15 python3-pytest \
16 python3-sqlite3 \
17 python3-unittest-automake-output \
18"
19
20do_install_ptest() {
21 install -d ${D}${PTEST_PATH}/tests
22 cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
23}
24
25RDEPENDS:${PN} = "\
26 python3-asyncio \
27 python3-dateutil \
28 python3-unittest \
29"