!21 update package to version 3.11.1

From: @li-miaomiao_zhr 
Reviewed-by: @licihua 
Signed-off-by: @licihua
This commit is contained in:
openeuler-ci-bot 2023-07-03 10:34:42 +00:00 committed by Gitee
commit 843b3a4ec9
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 36 additions and 11 deletions

BIN
pytest-mock-3.11.1.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -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 <mmlidc@isoftstone.com>
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

View File

@ -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 <mmlidc@isoftstone.com> - 3.11.1-1
- Update to 3.11.1
* Tue Apr 26 2022 caodongxia <caodongxia@h-partners.com> - 3.6.1-1
- update to 3.6.1