diff options
Diffstat (limited to 'meta-python')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-pytest-mock/0001-Add-asyncio-fixture-to-test_instance_async_method_sp.patch | 32 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-pytest-mock_3.15.1.bb (renamed from meta-python/recipes-devtools/python/python3-pytest-mock_3.14.1.bb) | 3 |
2 files changed, 1 insertions, 34 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pytest-mock/0001-Add-asyncio-fixture-to-test_instance_async_method_sp.patch b/meta-python/recipes-devtools/python/python3-pytest-mock/0001-Add-asyncio-fixture-to-test_instance_async_method_sp.patch deleted file mode 100644 index d57c51f880..0000000000 --- a/meta-python/recipes-devtools/python/python3-pytest-mock/0001-Add-asyncio-fixture-to-test_instance_async_method_sp.patch +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | From 17850cde66d52a851a8a15a61f5c97311d30a296 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 26 Jul 2025 16:03:03 -0700 | ||
| 4 | Subject: [PATCH] Add asyncio fixture to test_instance_async_method_spy | ||
| 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/pytest-dev/pytest-mock/pull/516] | ||
| 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 16 | --- | ||
| 17 | tests/test_pytest_mock.py | 2 +- | ||
| 18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 19 | |||
| 20 | diff --git a/tests/test_pytest_mock.py b/tests/test_pytest_mock.py | ||
| 21 | index 1a51636..b158d97 100644 | ||
| 22 | --- a/tests/test_pytest_mock.py | ||
| 23 | +++ b/tests/test_pytest_mock.py | ||
| 24 | @@ -523,7 +523,7 @@ def test_callable_like_spy(testdir: Any, mocker: MockerFixture) -> None: | ||
| 25 | assert spy.spy_return == 20 | ||
| 26 | assert spy.spy_return_list == [20] | ||
| 27 | |||
| 28 | - | ||
| 29 | +@pytest.mark.asyncio | ||
| 30 | async def test_instance_async_method_spy(mocker: MockerFixture) -> None: | ||
| 31 | class Foo: | ||
| 32 | async def bar(self, arg): | ||
diff --git a/meta-python/recipes-devtools/python/python3-pytest-mock_3.14.1.bb b/meta-python/recipes-devtools/python/python3-pytest-mock_3.15.1.bb index 07e2c60f54..835ff0ab3a 100644 --- a/meta-python/recipes-devtools/python/python3-pytest-mock_3.14.1.bb +++ b/meta-python/recipes-devtools/python/python3-pytest-mock_3.15.1.bb | |||
| @@ -6,10 +6,9 @@ LIC_FILES_CHKSUM = " \ | |||
| 6 | " | 6 | " |
| 7 | 7 | ||
| 8 | SRC_URI += " \ | 8 | SRC_URI += " \ |
| 9 | file://0001-Add-asyncio-fixture-to-test_instance_async_method_sp.patch \ | ||
| 10 | file://run-ptest \ | 9 | file://run-ptest \ |
| 11 | " | 10 | " |
| 12 | SRC_URI[sha256sum] = "159e9edac4c451ce77a5cdb9fc5d1100708d2dd4ba3c3df572f14097351af80e" | 11 | SRC_URI[sha256sum] = "1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f" |
| 13 | 12 | ||
| 14 | inherit pypi python_setuptools_build_meta ptest | 13 | inherit pypi python_setuptools_build_meta ptest |
| 15 | 14 | ||
