From 2c9a4075ef6ada63d9a0c4e0df5ead484c2f2685 Mon Sep 17 00:00:00 2001 From: Liu Yiding Date: Tue, 25 Nov 2025 17:16:31 +0800 Subject: python3-pytest-mock: upgrade 3.14.1 -> 3.15.1 1. Changelog: https://github.com/pytest-dev/pytest-mock/releases/tag/v3.15.1 2. Remove 0001-Add-asyncio-fixture-to-test_instance_async_method_sp.patch as it has been mergerd upstream. Signed-off-by: Liu Yiding Signed-off-by: Khem Raj --- ...-fixture-to-test_instance_async_method_sp.patch | 32 -------------------- .../python/python3-pytest-mock_3.14.1.bb | 35 ---------------------- .../python/python3-pytest-mock_3.15.1.bb | 34 +++++++++++++++++++++ 3 files changed, 34 insertions(+), 67 deletions(-) delete mode 100644 meta-python/recipes-devtools/python/python3-pytest-mock/0001-Add-asyncio-fixture-to-test_instance_async_method_sp.patch delete mode 100644 meta-python/recipes-devtools/python/python3-pytest-mock_3.14.1.bb create mode 100644 meta-python/recipes-devtools/python/python3-pytest-mock_3.15.1.bb (limited to 'meta-python/recipes-devtools/python') 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 @@ -From 17850cde66d52a851a8a15a61f5c97311d30a296 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 26 Jul 2025 16:03:03 -0700 -Subject: [PATCH] Add asyncio fixture to test_instance_async_method_spy - -This ensures that this test executes and passes -with pytest-8.4+ - -pytest now throws errors for such functions [1] -which were skipped in older versions - -[1] https://github.com/pytest-dev/pytest/issues/11372 - -Upstream-Status: Submitted [https://github.com/pytest-dev/pytest-mock/pull/516] -Signed-off-by: Khem Raj ---- - tests/test_pytest_mock.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/test_pytest_mock.py b/tests/test_pytest_mock.py -index 1a51636..b158d97 100644 ---- a/tests/test_pytest_mock.py -+++ b/tests/test_pytest_mock.py -@@ -523,7 +523,7 @@ def test_callable_like_spy(testdir: Any, mocker: MockerFixture) -> None: - assert spy.spy_return == 20 - assert spy.spy_return_list == [20] - -- -+@pytest.mark.asyncio - async def test_instance_async_method_spy(mocker: MockerFixture) -> None: - class Foo: - 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.14.1.bb deleted file mode 100644 index 07e2c60f54..0000000000 --- a/meta-python/recipes-devtools/python/python3-pytest-mock_3.14.1.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "Thin-wrapper around the mock package for easier use with pytest" -HOMEPAGE = "https://github.com/pytest-dev/pytest-mock/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = " \ - file://LICENSE;md5=b2ddb1e69238461b7e4ef2a84d874109 \ -" - -SRC_URI += " \ - file://0001-Add-asyncio-fixture-to-test_instance_async_method_sp.patch \ - file://run-ptest \ -" -SRC_URI[sha256sum] = "159e9edac4c451ce77a5cdb9fc5d1100708d2dd4ba3c3df572f14097351af80e" - -inherit pypi python_setuptools_build_meta ptest - -PYPI_PACKAGE = "pytest_mock" -UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}" - -DEPENDS += "python3-setuptools-scm-native" - -RDEPENDS:${PN}-ptest += " \ - python3-asyncio \ - python3-misc \ - python3-mock \ - python3-pytest \ - python3-pytest-asyncio \ - python3-threading \ - python3-tox \ - python3-unittest-automake-output \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests ${D}${PTEST_PATH}/ -} diff --git a/meta-python/recipes-devtools/python/python3-pytest-mock_3.15.1.bb b/meta-python/recipes-devtools/python/python3-pytest-mock_3.15.1.bb new file mode 100644 index 0000000000..835ff0ab3a --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pytest-mock_3.15.1.bb @@ -0,0 +1,34 @@ +SUMMARY = "Thin-wrapper around the mock package for easier use with pytest" +HOMEPAGE = "https://github.com/pytest-dev/pytest-mock/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = " \ + file://LICENSE;md5=b2ddb1e69238461b7e4ef2a84d874109 \ +" + +SRC_URI += " \ + file://run-ptest \ +" +SRC_URI[sha256sum] = "1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f" + +inherit pypi python_setuptools_build_meta ptest + +PYPI_PACKAGE = "pytest_mock" +UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}" + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS:${PN}-ptest += " \ + python3-asyncio \ + python3-misc \ + python3-mock \ + python3-pytest \ + python3-pytest-asyncio \ + python3-threading \ + python3-tox \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests ${D}${PTEST_PATH}/ +} -- cgit v1.2.3-54-g00ecf