python3-jdatetime: Enable tests

Inherit ptest and include tests for jdatetime. The PyPI package
omits some files for testing like tests/__init__.py so use the
GitHub source instead.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Leon Anavi
2026-06-23 12:41:27 +03:00
committed by Khem Raj
parent be7e93e82d
commit 5f21b155fd
2 changed files with 24 additions and 2 deletions
@@ -0,0 +1,3 @@
#!/bin/sh
pytest --automake
@@ -3,9 +3,15 @@ HOMEPAGE = "https://github.com/slashmili/python-jalali"
LICENSE = "Python-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=c80be45b33471b4a23cf53d06a8172be"
SRC_URI[sha256sum] = "d20eb9fc2a00e86493a6156b2a0e4e579f23379e8fea186a0e603fd36a130227"
# The PyPI package omits some files for testing like tests/__init__.py
# so use the GitHub source instead.
SRCREV = "ea119aab729d4c48f797f3663a692680c93fb9f5"
SRC_URI = " \
git://github.com/slashmili/jdatetime;branch=main;protocol=https \
file://run-ptest \
"
inherit pypi python_setuptools_build_meta
inherit python_setuptools_build_meta ptest
CLEANBROKEN = "1"
@@ -14,3 +20,16 @@ RDEPENDS:${PN} += " \
python3-jalali-core \
"
RDEPENDS:${PN}-ptest += " \
python3-pytest \
python3-core \
python3-pickle \
python3-unittest \
python3-zoneinfo \
python3-unittest-automake-output \
"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
}