diff options
Diffstat (limited to 'meta-python/recipes-devtools/python')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-pytest-cov_7.0.0.bb (renamed from meta-python/recipes-devtools/python/python3-pytest-cov_6.2.1.bb) | 6 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-pytest-picked/0001-adjust-failing-tests-to-capture-only-ptest-output.patch | 50 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-pytest-picked/run-ptest | 5 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-pytest-picked_0.5.1.bb | 20 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-tenacity/0001-ptest-skip-a-test-that-does-not-pass-on-qemu.patch | 27 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-tenacity_9.1.2.bb | 19 |
6 files changed, 124 insertions, 3 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pytest-cov_6.2.1.bb b/meta-python/recipes-devtools/python/python3-pytest-cov_7.0.0.bb index af4ce4b770..117767d1ee 100644 --- a/meta-python/recipes-devtools/python/python3-pytest-cov_6.2.1.bb +++ b/meta-python/recipes-devtools/python/python3-pytest-cov_7.0.0.bb | |||
| @@ -5,11 +5,11 @@ LIC_FILES_CHKSUM = " \ | |||
| 5 | file://LICENSE;md5=cbc4e25353c748c817db2daffe605e43 \ | 5 | file://LICENSE;md5=cbc4e25353c748c817db2daffe605e43 \ |
| 6 | " | 6 | " |
| 7 | 7 | ||
| 8 | SRC_URI[sha256sum] = "25cc6cc0a5358204b8108ecedc51a9b57b34cc6b8c967cc2c01a4e00d8a67da2" | 8 | SRC_URI[sha256sum] = "33c97eda2e049a0c5298e91f519302a1334c26ac65c1a483d6206fd458361af1" |
| 9 | 9 | ||
| 10 | inherit pypi setuptools3 | 10 | inherit pypi python_setuptools_build_meta python_hatchling |
| 11 | 11 | ||
| 12 | DEPENDS += "python3-setuptools-scm-native" | 12 | DEPENDS += "python3-setuptools-scm-native python3-hatch-fancy-pypi-readme-native" |
| 13 | RDEPENDS:${PN} += "python3-coverage python3-pytest python3-pluggy" | 13 | RDEPENDS:${PN} += "python3-coverage python3-pytest python3-pluggy" |
| 14 | 14 | ||
| 15 | PYPI_PACKAGE = "pytest_cov" | 15 | PYPI_PACKAGE = "pytest_cov" |
diff --git a/meta-python/recipes-devtools/python/python3-pytest-picked/0001-adjust-failing-tests-to-capture-only-ptest-output.patch b/meta-python/recipes-devtools/python/python3-pytest-picked/0001-adjust-failing-tests-to-capture-only-ptest-output.patch new file mode 100644 index 0000000000..dfb50ace75 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pytest-picked/0001-adjust-failing-tests-to-capture-only-ptest-output.patch | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | From b9341394314e5dcaca0aa1d91fc3af28c64db387 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Tom Geelen <t.f.g.geelen@gmail.com> | ||
| 3 | Date: Tue, 25 Nov 2025 20:42:15 +0100 | ||
| 4 | Subject: [PATCH] adjust failing tests to capture only ptest output | ||
| 5 | |||
| 6 | The tests should only check for warnings emitted by the plugin itself, | ||
| 7 | not for any other warnings that may be emitted by other plugins or pytest | ||
| 8 | itself. | ||
| 9 | |||
| 10 | Signed-off-by: Tom Geelen <t.f.g.geelen@gmail.com> | ||
| 11 | Upstream-Status: Inappropriate [OE specific] | ||
| 12 | --- | ||
| 13 | tests/test_pytest_picked.py | 17 ++++++++++++++--- | ||
| 14 | 1 file changed, 14 insertions(+), 3 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/tests/test_pytest_picked.py b/tests/test_pytest_picked.py | ||
| 17 | index fb2bedb..947b43a 100644 | ||
| 18 | --- a/tests/test_pytest_picked.py | ||
| 19 | +++ b/tests/test_pytest_picked.py | ||
| 20 | @@ -182,8 +182,13 @@ def test_should_accept_branch_as_mode(testdir, tmpdir, recwarn): | ||
| 21 | "Changed test folders... 0. []", | ||
| 22 | ] | ||
| 23 | ) | ||
| 24 | - assert len(recwarn) == 1 | ||
| 25 | - assert str(recwarn[0].message) == "Now `main` is the default parent branch" | ||
| 26 | + # Only count the plugin's own UserWarning about default parent branch | ||
| 27 | + plugin_warnings = [ | ||
| 28 | + w | ||
| 29 | + for w in recwarn | ||
| 30 | + if w.category is UserWarning and "default parent branch" in str(w.message) | ||
| 31 | + ] | ||
| 32 | + assert len(plugin_warnings) == 1 | ||
| 33 | |||
| 34 | |||
| 35 | def test_should_accept_unstaged_as_mode(testdir, tmpdir, recwarn): | ||
| 36 | @@ -211,7 +216,13 @@ def test_should_accept_unstaged_as_mode(testdir, tmpdir, recwarn): | ||
| 37 | "Changed test folders... 0. []", | ||
| 38 | ] | ||
| 39 | ) | ||
| 40 | - assert len(recwarn) == 0 | ||
| 41 | + # Ignore unrelated deprecation warnings from other plugins | ||
| 42 | + plugin_warnings = [ | ||
| 43 | + w | ||
| 44 | + for w in recwarn | ||
| 45 | + if w.category is UserWarning and "default parent branch" in str(w.message) | ||
| 46 | + ] | ||
| 47 | + assert len(plugin_warnings) == 0 | ||
| 48 | |||
| 49 | |||
| 50 | def test_should_not_run_the_tests_if_mode_is_invalid(testdir, tmpdir): | ||
diff --git a/meta-python/recipes-devtools/python/python3-pytest-picked/run-ptest b/meta-python/recipes-devtools/python/python3-pytest-picked/run-ptest new file mode 100644 index 0000000000..39f369f20b --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pytest-picked/run-ptest | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # need to explicitly call the correct fixture as of pytest 8.x | ||
| 4 | |||
| 5 | pytest -p pytester --automake | ||
diff --git a/meta-python/recipes-devtools/python/python3-pytest-picked_0.5.1.bb b/meta-python/recipes-devtools/python/python3-pytest-picked_0.5.1.bb new file mode 100644 index 0000000000..c7c2183337 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pytest-picked_0.5.1.bb | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | SUMMARY = "Run the tests related to the changed files" | ||
| 2 | HOMEPAGE = "https://github.com/anapaulagomes/pytest-picked" | ||
| 3 | LICENSE = "MIT" | ||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=6d374a27c85c3fcc979009952ec16f1b" | ||
| 5 | RECIPE_MAINTAINER = "Tom Geelen <t.f.g.geelen@gmail.com>" | ||
| 6 | |||
| 7 | SRC_URI += "file://run-ptest \ | ||
| 8 | file://0001-adjust-failing-tests-to-capture-only-ptest-output.patch \ | ||
| 9 | " | ||
| 10 | SRC_URI[sha256sum] = "6634c4356a560a5dc3dba35471865e6eb06bbd356b56b69c540593e9d5620ded" | ||
| 11 | |||
| 12 | inherit pypi python_setuptools_build_meta ptest-python-pytest | ||
| 13 | |||
| 14 | RDEPENDS:${PN} += "\ | ||
| 15 | git \ | ||
| 16 | python3-pytest (>=3.7.0) \ | ||
| 17 | " | ||
| 18 | |||
| 19 | PYPI_PACKAGE = "pytest_picked" | ||
| 20 | UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}" | ||
diff --git a/meta-python/recipes-devtools/python/python3-tenacity/0001-ptest-skip-a-test-that-does-not-pass-on-qemu.patch b/meta-python/recipes-devtools/python/python3-tenacity/0001-ptest-skip-a-test-that-does-not-pass-on-qemu.patch new file mode 100644 index 0000000000..7fb9458a32 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-tenacity/0001-ptest-skip-a-test-that-does-not-pass-on-qemu.patch | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | From 8895af81a672bb8aad2aa8e32b93cb9ca96cac63 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jan Vermaete <jan.vermaete@oip.be> | ||
| 3 | Date: Tue, 25 Nov 2025 10:52:15 +0100 | ||
| 4 | Subject: [PATCH 1/1] ptest: skip a test that does not pass on qemu | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [oe specific] | ||
| 7 | |||
| 8 | Signed-off-by: Jan Vermaete <jan.vermaete@oip.be> | ||
| 9 | --- | ||
| 10 | tests/test_asyncio.py | 1 + | ||
| 11 | 1 file changed, 1 insertion(+) | ||
| 12 | |||
| 13 | diff --git a/tests/test_asyncio.py b/tests/test_asyncio.py | ||
| 14 | index 0b74476..2da0784 100644 | ||
| 15 | --- a/tests/test_asyncio.py | ||
| 16 | +++ b/tests/test_asyncio.py | ||
| 17 | @@ -192,6 +192,7 @@ class TestContextManager(unittest.TestCase): | ||
| 18 | else: | ||
| 19 | raise Exception | ||
| 20 | |||
| 21 | + @unittest.skip("Failing in ptest with qemu") | ||
| 22 | @asynctest | ||
| 23 | async def test_sleeps(self): | ||
| 24 | start = current_time_ms() | ||
| 25 | -- | ||
| 26 | 2.43.0 | ||
| 27 | |||
diff --git a/meta-python/recipes-devtools/python/python3-tenacity_9.1.2.bb b/meta-python/recipes-devtools/python/python3-tenacity_9.1.2.bb new file mode 100644 index 0000000000..76d23aee40 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-tenacity_9.1.2.bb | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | SUMMARY = "Retry code until it succeeds" | ||
| 2 | HOMEPAGE = "https://github.com/jd/tenacity" | ||
| 3 | LICENSE = "Apache-2.0" | ||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=175792518e4ac015ab6696d16c4f607e" | ||
| 5 | |||
| 6 | SRC_URI[sha256sum] = "1169d376c297e7de388d18b4481760d478b0e99a777cad3a9c86e556f4b697cb" | ||
| 7 | |||
| 8 | SRC_URI:append = "file://0001-ptest-skip-a-test-that-does-not-pass-on-qemu.patch" | ||
| 9 | |||
| 10 | DEPENDS += "python3-setuptools-scm-native" | ||
| 11 | |||
| 12 | inherit pypi python_setuptools_build_meta ptest-python-pytest | ||
| 13 | |||
| 14 | PYPI_PACKAGE = "tenacity" | ||
| 15 | |||
| 16 | RDEPENDS:${PN}-ptest += "\ | ||
| 17 | python3-tornado \ | ||
| 18 | python3-typeguard \ | ||
| 19 | " | ||
