Inherit ptest and include tests for unidecode.

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <[email protected]>
---
 .../python/python3-unidecode/run-ptest         |  3 +++
 .../python/python3-unidecode_1.4.0.bb          | 18 +++++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 
meta-python/recipes-devtools/python/python3-unidecode/run-ptest

diff --git a/meta-python/recipes-devtools/python/python3-unidecode/run-ptest 
b/meta-python/recipes-devtools/python/python3-unidecode/run-ptest
new file mode 100644
index 0000000000..8d2017d39c
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-unidecode/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest --automake
diff --git a/meta-python/recipes-devtools/python/python3-unidecode_1.4.0.bb 
b/meta-python/recipes-devtools/python/python3-unidecode_1.4.0.bb
index c6969fca4d..ac94ae5cee 100644
--- a/meta-python/recipes-devtools/python/python3-unidecode_1.4.0.bb
+++ b/meta-python/recipes-devtools/python/python3-unidecode_1.4.0.bb
@@ -5,8 +5,24 @@ SECTION = "devel/python"
 LICENSE = "GPL-2.0-or-later"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-inherit pypi setuptools3
+inherit pypi setuptools3 ptest
 
 PYPI_PACKAGE = "Unidecode"
 
+SRC_URI += "file://run-ptest"
+
 SRC_URI[sha256sum] = 
"ce35985008338b676573023acc382d62c264f307c8f7963733405add37ea2b23"
+
+RDEPENDS:${PN}-ptest += " \
+    python3-pytest \
+    python3-core \
+    python3-io \
+    python3-doctest \
+    python3-unittest \
+    python3-unittest-automake-output \
+"
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
-- 
2.47.3

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#128111): 
https://lists.openembedded.org/g/openembedded-devel/message/128111
Mute This Topic: https://lists.openembedded.org/mt/120173194/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to