diff mbox series

[meta-python,2/5] python3-python-multipart: upgrade 0.0.11 > 0.0.12 and enable ptest

Message ID 20241011130441.2919272-2-alperyasinak1@gmail.com
State Accepted
Headers show
Series [meta-python,1/5] python3-propcache: enable ptest | expand

Commit Message

alperak Oct. 11, 2024, 1:04 p.m. UTC
- Tested on qemux86-64 and qemuarm64

- Added ptest into PTESTS_FAST_META_PYTHON

Ptest result:
=============

qemux86-64:

Testsuite summary
TOTAL: 115
PASS: 115
SKIP: 0
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 24
END: /usr/lib/python3-python-multipart/ptest
2024-10-11T09:02
STOP: ptest-runner
TOTAL: 1 FAIL: 0

qemuarm64:

Testsuite summary
TOTAL: 115
PASS: 115
SKIP: 0
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 22
END: /usr/lib/python3-python-multipart/ptest
2024-10-11T09:08
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Changelog:

- Enforce 100% coverage
- Add mypy strict typing
- Improve error message when boundary character does not match

Signed-off-by: alperak <alperyasinak1@gmail.com>
---
 .../ptest-packagelists-meta-python.inc        |  1 +
 .../python/python3-python-multipart/run-ptest |  3 +++
 .../python/python3-python-multipart_0.0.11.bb |  9 -------
 .../python/python3-python-multipart_0.0.12.bb | 24 +++++++++++++++++++
 4 files changed, 28 insertions(+), 9 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-python-multipart/run-ptest
 delete mode 100644 meta-python/recipes-devtools/python/python3-python-multipart_0.0.11.bb
 create mode 100644 meta-python/recipes-devtools/python/python3-python-multipart_0.0.12.bb
diff mbox series

Patch

diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc
index 25d71a2b6..7864b632a 100644
--- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
+++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
@@ -53,6 +53,7 @@  PTESTS_FAST_META_PYTHON = "\
     python3-pydantic \
     python3-pydantic-core \
     python3-pylint \
+    python3-python-multipart \
     python3-ptyprocess \
     python3-py-cpuinfo \
     python3-pyasn1-modules \
diff --git a/meta-python/recipes-devtools/python/python3-python-multipart/run-ptest b/meta-python/recipes-devtools/python/python3-python-multipart/run-ptest
new file mode 100644
index 000000000..8d2017d39
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-python-multipart/run-ptest
@@ -0,0 +1,3 @@ 
+#!/bin/sh
+
+pytest --automake
diff --git a/meta-python/recipes-devtools/python/python3-python-multipart_0.0.11.bb b/meta-python/recipes-devtools/python/python3-python-multipart_0.0.11.bb
deleted file mode 100644
index b325f90ad..000000000
--- a/meta-python/recipes-devtools/python/python3-python-multipart_0.0.11.bb
+++ /dev/null
@@ -1,9 +0,0 @@ 
-SUMMARY = "A streaming multipart parser for Python"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3d98f0d58b28321924a89ab60c82410e"
-
-SRC_URI[sha256sum] = "1d377f074b69a47dd204c990de57a7cf03d9b85695a3e57faec32d54b78e3e48"
-
-inherit pypi python_hatchling
-
-PYPI_PACKAGE = "python_multipart"
diff --git a/meta-python/recipes-devtools/python/python3-python-multipart_0.0.12.bb b/meta-python/recipes-devtools/python/python3-python-multipart_0.0.12.bb
new file mode 100644
index 000000000..340e297b8
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-python-multipart_0.0.12.bb
@@ -0,0 +1,24 @@ 
+SUMMARY = "A streaming multipart parser for Python"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3d98f0d58b28321924a89ab60c82410e"
+
+SRC_URI[sha256sum] = "045e1f98d719c1ce085ed7f7e1ef9d8ccc8c02ba02b5566d5f7521410ced58cb"
+
+inherit pypi python_hatchling ptest
+
+PYPI_PACKAGE = "python_multipart"
+
+SRC_URI += " \
+	file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest = " \
+	python3-pytest \
+	python3-pyyaml \
+	python3-unittest-automake-output \
+"
+
+do_install_ptest() {
+	install -d ${D}${PTEST_PATH}/tests
+	cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}