diff options
| author | Khem Raj <raj.khem@gmail.com> | 2025-11-18 13:39:24 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-11-18 16:24:13 -0800 |
| commit | d055504748e916a82667e9ab349c11c4e3294e5f (patch) | |
| tree | 5106db70e8c752b42ca18814b9976ceed580e701 /meta-python/recipes-devtools | |
| parent | 0434d3dad64b532a9f136c077ad9f1d37b1b1b53 (diff) | |
| download | meta-openembedded-d055504748e916a82667e9ab349c11c4e3294e5f.tar.gz | |
python3-blinker: Fix ptests with pytest 8.4+
pytest 8.4 is less forgiving about functions not marked async and using
it
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-blinker/0001-Add-asyncio-fixture-to-test_async_receiver.patch | 32 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-blinker_1.9.0.bb | 4 |
2 files changed, 36 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-blinker/0001-Add-asyncio-fixture-to-test_async_receiver.patch b/meta-python/recipes-devtools/python/python3-blinker/0001-Add-asyncio-fixture-to-test_async_receiver.patch new file mode 100644 index 0000000000..2f3d1dfa5d --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-blinker/0001-Add-asyncio-fixture-to-test_async_receiver.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | From 2edb837a27ea52ec98d2c72db3534cc764c41337 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 18 Nov 2025 13:06:49 -0800 | ||
| 4 | Subject: [PATCH] Add asyncio fixture to test_async_receiver | ||
| 5 | |||
| 6 | This ensures that this test executes and passes | ||
| 7 | with pytest-8.4+ | ||
| 8 | |||
| 9 | pytest now throws errors for such functions [1] | ||
| 10 | which were skipped in older versions | ||
| 11 | |||
| 12 | [1] https://github.com/pytest-dev/pytest/issues/11372 | ||
| 13 | |||
| 14 | Upstream-Status: Submitted [https://github.com/pallets-eco/blinker/pull/187] | ||
| 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 16 | --- | ||
| 17 | tests/test_signals.py | 2 +- | ||
| 18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 19 | |||
| 20 | diff --git a/tests/test_signals.py b/tests/test_signals.py | ||
| 21 | index 93a9c48..da88627 100644 | ||
| 22 | --- a/tests/test_signals.py | ||
| 23 | +++ b/tests/test_signals.py | ||
| 24 | @@ -256,7 +256,7 @@ def test_strong_receiver() -> None: | ||
| 25 | assert sentinel | ||
| 26 | assert [id(fn) for fn in sig.receivers.values()] == [fn_id] | ||
| 27 | |||
| 28 | - | ||
| 29 | +@pytest.mark.asyncio | ||
| 30 | async def test_async_receiver() -> None: | ||
| 31 | sentinel = [] | ||
| 32 | |||
diff --git a/meta-python/recipes-devtools/python/python3-blinker_1.9.0.bb b/meta-python/recipes-devtools/python/python3-blinker_1.9.0.bb index f82d686a64..7ddcd04b62 100644 --- a/meta-python/recipes-devtools/python/python3-blinker_1.9.0.bb +++ b/meta-python/recipes-devtools/python/python3-blinker_1.9.0.bb | |||
| @@ -2,6 +2,7 @@ DESCRIPTION = "Fast, simple object-to-object and broadcast signaling." | |||
| 2 | LICENSE = "MIT" | 2 | LICENSE = "MIT" |
| 3 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=42cd19c88fc13d1307a4efd64ee90e4e" | 3 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=42cd19c88fc13d1307a4efd64ee90e4e" |
| 4 | 4 | ||
| 5 | SRC_URI += "file://0001-Add-asyncio-fixture-to-test_async_receiver.patch" | ||
| 5 | SRC_URI[sha256sum] = "b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf" | 6 | SRC_URI[sha256sum] = "b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf" |
| 6 | 7 | ||
| 7 | inherit pypi python_flit_core ptest-python-pytest | 8 | inherit pypi python_flit_core ptest-python-pytest |
| @@ -9,3 +10,6 @@ inherit pypi python_flit_core ptest-python-pytest | |||
| 9 | RDEPENDS:${PN} += "\ | 10 | RDEPENDS:${PN} += "\ |
| 10 | python3-asyncio \ | 11 | python3-asyncio \ |
| 11 | " | 12 | " |
| 13 | RDEPENDS:${PN}-ptest += "\ | ||
| 14 | python3-pytest-asyncio \ | ||
| 15 | " | ||
