diff --git a/pytest-mock-3.11.1.tar.gz b/pytest-mock-3.11.1.tar.gz new file mode 100644 index 0000000..fc77315 Binary files /dev/null and b/pytest-mock-3.11.1.tar.gz differ diff --git a/pytest-mock-3.6.1.tar.gz b/pytest-mock-3.6.1.tar.gz deleted file mode 100644 index 5b8477d..0000000 Binary files a/pytest-mock-3.6.1.tar.gz and /dev/null differ diff --git a/pytest-mock-issue272-asyncio.patch b/pytest-mock-issue272-asyncio.patch index b28f9fb..d2e9db6 100644 --- a/pytest-mock-issue272-asyncio.patch +++ b/pytest-mock-issue272-asyncio.patch @@ -1,8 +1,17 @@ -Index: pytest-mock-3.6.1/tests/test_pytest_mock.py -=================================================================== ---- pytest-mock-3.6.1.orig/tests/test_pytest_mock.py -+++ pytest-mock-3.6.1/tests/test_pytest_mock.py -@@ -839,7 +839,7 @@ def test_plain_stopall(testdir: Any) -> +From 18f6ba2f7733e0145c87038bed8e1f95b1125e56 Mon Sep 17 00:00:00 2001 +From: li-miaomiao_zhr +Date: Wed, 28 Jun 2023 15:08:15 +0800 +Subject: [PATCH] pytest mock issue272 asyncio + +--- + tests/test_pytest_mock.py | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/tests/test_pytest_mock.py b/tests/test_pytest_mock.py +index 3d53241..5e3ac7b 100644 +--- a/tests/test_pytest_mock.py ++++ b/tests/test_pytest_mock.py +@@ -948,7 +948,7 @@ def test_plain_stopall(testdir: Any) -> None: """ ) result = testdir.runpytest_subprocess() @@ -11,7 +20,7 @@ Index: pytest-mock-3.6.1/tests/test_pytest_mock.py assert "RuntimeError" not in result.stderr.str() -@@ -978,7 +978,7 @@ def test_used_with_class_scope(testdir: +@@ -1093,7 +1093,7 @@ def test_used_with_class_scope(testdir: Any) -> None: ) result = testdir.runpytest_subprocess() assert "AssertionError" not in result.stderr.str() @@ -20,7 +29,7 @@ Index: pytest-mock-3.6.1/tests/test_pytest_mock.py def test_used_with_module_scope(testdir: Any) -> None: -@@ -1000,7 +1000,7 @@ def test_used_with_module_scope(testdir: +@@ -1121,7 +1121,7 @@ def test_used_with_module_scope(testdir: Any) -> None: ) result = testdir.runpytest_subprocess() assert "AssertionError" not in result.stderr.str() @@ -29,7 +38,7 @@ Index: pytest-mock-3.6.1/tests/test_pytest_mock.py def test_used_with_package_scope(testdir: Any) -> None: -@@ -1023,7 +1023,7 @@ def test_used_with_package_scope(testdir +@@ -1149,7 +1149,7 @@ def test_used_with_package_scope(testdir: Any) -> None: ) result = testdir.runpytest_subprocess() assert "AssertionError" not in result.stderr.str() @@ -38,9 +47,15 @@ Index: pytest-mock-3.6.1/tests/test_pytest_mock.py def test_used_with_session_scope(testdir: Any) -> None: -@@ -1046,4 +1046,4 @@ def test_used_with_session_scope(testdir +@@ -1177,7 +1177,7 @@ def test_used_with_session_scope(testdir: Any) -> None: ) result = testdir.runpytest_subprocess() assert "AssertionError" not in result.stderr.str() - result.stdout.fnmatch_lines("* 1 passed in *") + result.stdout.fnmatch_lines("* 1 passed*") + + + def test_stop_patch(mocker): +-- +2.39.1 + diff --git a/python-pytest-mock.spec b/python-pytest-mock.spec index a4e22c7..f50d9aa 100644 --- a/python-pytest-mock.spec +++ b/python-pytest-mock.spec @@ -1,11 +1,12 @@ Name: python-pytest-mock -Version: 3.6.1 +Version: 3.11.1 Release: 1 Summary: Thin-wrapper around the mock package for easier use with py.test License: MIT URL: https://pypi.python.org/pypi/pytest-mock Source0: https://files.pythonhosted.org/packages/b3/08/b131e1b5c628a7d46c9b8d676a86a8d235bced79b9d90845500e39df81b9/pytest-mock-%{version}.tar.gz Patch0001: pytest-mock-issue272-asyncio.patch + BuildArch: noarch %description @@ -40,7 +41,13 @@ rm -rf *.egg-info %check -/usr/bin/pytest --assert=plain +CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \ +PATH="%{buildroot}%{_bindir}:$PATH" \ +PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}" \ +PYTHONDONTWRITEBYTECODE=1 \ +%{?__pytest_addopts:PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} %{__pytest_addopts}"} \ +PYTEST_XDIST_AUTO_NUM_WORKERS=%{_smp_build_ncpus} \ +%{_bindir}/pytest --assert=plain %files -n python3-pytest-mock %doc README.rst @@ -49,6 +56,9 @@ rm -rf *.egg-info %{python3_sitelib}/pytest_mock/ %changelog +* Wed Jun 28 2023 li-miaomiao_zhr - 3.11.1-1 +- Update to 3.11.1 + * Tue Apr 26 2022 caodongxia - 3.6.1-1 - update to 3.6.1