diff mbox series

[meta-python,2/2] python3-wand: Enable tests

Message ID 20260710212823.1567516-2-leon.anavi@konsulko.com
State Under Review
Headers show
Series [meta-python,1/2] python3-rarfile: Enable tests | expand

Commit Message

Leon Anavi July 10, 2026, 9:28 p.m. UTC
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 <leon.anavi@konsulko.com>
---
 .../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
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-wand/run-ptest b/meta-python/recipes-devtools/python/python3-wand/run-ptest
new file mode 100644
index 0000000000..2aa830d161
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-wand/run-ptest
@@ -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"
diff --git a/meta-python/recipes-devtools/python/python3-wand_0.7.2.bb b/meta-python/recipes-devtools/python/python3-wand_0.7.2.bb
index 8b46b28cb6..305aeaeb11 100644
--- a/meta-python/recipes-devtools/python/python3-wand_0.7.2.bb
+++ b/meta-python/recipes-devtools/python/python3-wand_0.7.2.bb
@@ -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"