Accepting request 1039088 from devel:languages:python:pytest

- Remove python_module macro definition
- Remove pytest-mock-issue272-asyncio.patch
- Add python-py dependency
- Update to 3.10.0:
  * Added new mocker.stop(m) method to stop specific mocker.patch or mocker.spy
    calls (#319).
- 3.9.0:
  * Expose NonCallableMagicMock via the mocker fixture (#318).
- 3.8.2:
  * Fixed AsyncMock support for Python 3.7+ in mocker.async_stub (#302).
- 3.8.1:
  * Fix regression caused by an explicit mock dependency in the code (#298).
- 3.8.0:
  * Add MockerFixture.async_mock method. Thanks @PerchunPak for the PR (#296).
- 3.7.0:
  * Python 3.10 now officially supported.
  * Dropped support for Python 3.6.

OBS-URL: https://build.opensuse.org/request/show/1039088
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=22
This commit is contained in:
Dominique Leuenberger 2023-01-06 16:04:30 +00:00 committed by Git OBS Bridge
commit 2490d4754d
5 changed files with 27 additions and 53 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fbbdb085ef7c252a326fd8cdcac0aa3b1333d8811f131bdcc701002e1be7ed4f
size 28384

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:40217a058c52a63f1042f0784f62009e976ba824c418cced42e88d5f40ab0e62
size 29933

View File

@ -1,46 +0,0 @@
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) ->
"""
)
result = testdir.runpytest_subprocess()
- result.stdout.fnmatch_lines("* 1 passed in *")
+ result.stdout.fnmatch_lines("* 1 passed*")
assert "RuntimeError" not in result.stderr.str()
@@ -978,7 +978,7 @@ def test_used_with_class_scope(testdir:
)
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_used_with_module_scope(testdir: Any) -> None:
@@ -1000,7 +1000,7 @@ def test_used_with_module_scope(testdir:
)
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_used_with_package_scope(testdir: Any) -> None:
@@ -1023,7 +1023,7 @@ def test_used_with_package_scope(testdir
)
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_used_with_session_scope(testdir: Any) -> None:
@@ -1046,4 +1046,4 @@ def test_used_with_session_scope(testdir
)
result = testdir.runpytest_subprocess()
assert "AssertionError" not in result.stderr.str()
- result.stdout.fnmatch_lines("* 1 passed in *")
+ result.stdout.fnmatch_lines("* 1 passed*")

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Wed Nov 30 11:25:21 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
- Remove python_module macro definition
- Remove pytest-mock-issue272-asyncio.patch
- Add python-py dependency
- Update to 3.10.0:
* Added new mocker.stop(m) method to stop specific mocker.patch or mocker.spy
calls (#319).
- 3.9.0:
* Expose NonCallableMagicMock via the mocker fixture (#318).
- 3.8.2:
* Fixed AsyncMock support for Python 3.7+ in mocker.async_stub (#302).
- 3.8.1:
* Fix regression caused by an explicit mock dependency in the code (#298).
- 3.8.0:
* Add MockerFixture.async_mock method. Thanks @PerchunPak for the PR (#296).
- 3.7.0:
* Python 3.10 now officially supported.
* Dropped support for Python 3.6.
-------------------------------------------------------------------
Sat Jan 22 11:58:55 UTC 2022 - Ben Greiner <code@bnavigator.de>

View File

@ -16,23 +16,22 @@
#
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-pytest-mock
Version: 3.6.1
Version: 3.10.0
Release: 0
Summary: Thin-wrapper around the mock package for easier use with pytest
License: MIT
URL: https://github.com/pytest-dev/pytest-mock
Source: https://files.pythonhosted.org/packages/source/p/pytest-mock/pytest-mock-%{version}.tar.gz
# PATCH-FIX-UPSTREAM pytest-mock-issue272-asyncio.patch -- gh#pytest-dev/pytest-mock#272
Patch0: pytest-mock-issue272-asyncio.patch
BuildRequires: %{python_module pytest >= 5}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module py}
BuildRequires: %{python_module setuptools >= 36}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-py
Requires: python-pytest
BuildArch: noarch
%python_subpackages