python3-rarfile: Enable tests
PATCH 1/2 python3-rarfile: Enable tests
Inherit ptest, include tests for rarfile and run the relevant test cases.
This work was sponsored by GOVCERT.LU.
Signed-off-by Leon Anavi <[email protected]>
--- .../python/python3-rarfile/run-ptest | 13 ++++++++++++ .../python/python3-rarfile_4.3.bb | 21 ++++++++++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 meta-python/recipes-devtools/python/python3-rarfile/run-ptest
meta-python/recipes-devtools/python/python3-rarfile/run-ptest new file +13 -0
@@ -0,0 +1,13 @@ +#!/bin/sh + +pytest --automake \ + --deselect "test/test_api.py::test_not_rar" \ + --deselect "test/test_extract.py::test_readonly[test/files/rar3-readonly-unix.rar]" \ + --deselect "test/test_extract.py::test_readonly[test/files/rar3-readonly-win.rar]" \ + --deselect "test/test_extract.py::test_readonly[test/files/rar5-readonly-unix.rar]" \ + --deselect "test/test_extract.py::test_readonly[test/files/rar5-readonly-win.rar]" \ + --deselect "test/test_reading.py::test_reading[test/files/rar15-comment-lock.rar]" \ + --deselect "test/test_reading.py::test_reading[test/files/rar15-comment.rar]" \ + --deselect "test/test_reading.py::test_reading[test/files/rar202-comment-nopsw.rar]" \ + --deselect "test/test_reading.py::test_reading[test/files/rar202-comment-psw.rar]" \ + --deselect "test/test_tool.py::test_unrar_tool"
meta-python/recipes-devtools/python/python3-rarfile_4.3.bb +18 -3
@@ -6,11 +6,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1916695551f7eec48dfd97db9467b831" inherit setuptools3 -SRC_URI[sha256sum] = "0d8b5a7ffb9f8e9a7b002f2398905e4420c0cb373e799b48e48f418db9c8816a" +SRC_URI += "file://run-ptest" -inherit pypi +SRC_URI[sha256sum] = "0d8b5a7ffb9f8e9a7b002f2398905e4420c0cb373e799b48e48f418db9c8816a" -PYPI_PACKAGE = "rarfile" +inherit pypi ptest RDEPENDS:${PN} += "\ 7zip \
@@ -20,4 +20,19 @@ RDEPENDS:${PN} += "\ python3-io \ " +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-core \ + python3-datetime \ + python3-crypt \ + python3-compression \ + python3-unittest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/test + cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/ +} + BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.47.3
PATCH 2/2 python3-wand: Enable tests
Inherit ptest, include tests for wand and run the relevant test cases. Add imagemagick as a runtime dependency.
This work was sponsored by GOVCERT.LU.
Signed-off-by Leon Anavi <[email protected]>
--- .../python/python3-wand/run-ptest | 5 ++++ .../python/python3-wand_0.7.2.bb | 23 ++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 meta-python/recipes-devtools/python/python3-wand/run-ptest
meta-python/recipes-devtools/python/python3-wand/run-ptest new file +5 -0
@@ -0,0 +1,5 @@ +#!/bin/sh + +pytest --automake \ + --deselect "tests/image_methods_test.py::test_inverse_fourier_transform" \ + --deselect "tests/image_methods_test.py::test_forward_fourier_transform"
meta-python/recipes-devtools/python/python3-wand_0.7.2.bb +22 -1
@@ -4,13 +4,34 @@ LICENSE = "MIT" SECTION = "devel/python" LIC_FILES_CHKSUM = "file://LICENSE;md5=2a2b05e6331064556e971cfa0efca0bf" +SRC_URI += "file://run-ptest" + SRC_URI[sha256sum] = "0387fd08848d00cadd1d885fcb19a17dd4250df2029e5338b6b668b7fed64b5b" -inherit pypi python_setuptools_build_meta +inherit pypi python_setuptools_build_meta ptest PYPI_PACKAGE = "wand" UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}" FILES:${PN}-doc += "${datadir}/README.rst" +RDEPENDS:${PN} += " \ + imagemagick \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-core \ + python3-datetime \ + python3-numbers \ + python3-unittest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ + cp -f ${S}/pyproject.toml ${D}${PTEST_PATH}/ +} + BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.47.3