Compare commits
10 Commits
0da68e87b5
...
d13aac8a75
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d13aac8a75 | ||
|
|
dd98e24c22 | ||
|
|
aa195dac46 | ||
|
|
0eb07f384d | ||
|
|
0d34590550 | ||
|
|
74980cff4d | ||
|
|
7862874c1f | ||
|
|
c1dd0b29a2 | ||
|
|
2e42cbf0d7 | ||
|
|
b246b4c18b |
Binary file not shown.
BIN
pytest-mock-3.6.1.tar.gz
Normal file
BIN
pytest-mock-3.6.1.tar.gz
Normal file
Binary file not shown.
46
pytest-mock-issue272-asyncio.patch
Normal file
46
pytest-mock-issue272-asyncio.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
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*")
|
||||||
@ -1,10 +1,11 @@
|
|||||||
Name: python-pytest-mock
|
Name: python-pytest-mock
|
||||||
Version: 1.10.0
|
Version: 3.6.1
|
||||||
Release: 4
|
Release: 1
|
||||||
Summary: Thin-wrapper around the mock package for easier use with py.test
|
Summary: Thin-wrapper around the mock package for easier use with py.test
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://pypi.python.org/pypi/pytest-mock
|
URL: https://pypi.python.org/pypi/pytest-mock
|
||||||
Source0: https://files.pythonhosted.org/packages/source/p/pytest-mock/pytest-mock-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/b3/08/b131e1b5c628a7d46c9b8d676a86a8d235bced79b9d90845500e39df81b9/pytest-mock-%{version}.tar.gz
|
||||||
|
Patch0001: pytest-mock-issue272-asyncio.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -13,23 +14,10 @@ patching API provided by the mock package.
|
|||||||
Besides undoing the mocking automatically after the end of the test,
|
Besides undoing the mocking automatically after the end of the test,
|
||||||
it also provides other nice utilities.
|
it also provides other nice utilities.
|
||||||
|
|
||||||
%package -n python2-pytest-mock
|
|
||||||
Summary: Thin-wrapper around the mock package for easier use with py.test
|
|
||||||
BuildArch: noarch
|
|
||||||
BuildRequires: python2-devel python2-pytest >= 2.7 python2-mock python2-setuptools_scm
|
|
||||||
Requires: python2-pytest >= 2.7 python2-mock
|
|
||||||
%{?python_provide:%python_provide python2-pytest-mock}
|
|
||||||
|
|
||||||
%description -n python2-pytest-mock
|
|
||||||
This plugin provides a mocker fixture which is a thin-wrapper around the
|
|
||||||
patching API provided by the mock package.
|
|
||||||
Besides undoing the mocking automatically after the end of the test,
|
|
||||||
it also provides other nice utilities.
|
|
||||||
|
|
||||||
%package -n python3-pytest-mock
|
%package -n python3-pytest-mock
|
||||||
Summary: Thin-wrapper around the mock package for easier use with py.test
|
Summary: Thin-wrapper around the mock package for easier use with py.test
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python3-devel python3-pytest >= 2.7 python3-setuptools_scm
|
BuildRequires: python3-devel python3-pytest >= 2.7 python3-setuptools_scm python3-pytest-mock
|
||||||
Requires: python3-pytest >= 2.7
|
Requires: python3-pytest >= 2.7
|
||||||
%{?python_provide:%python_provide python3-pytest-mock}
|
%{?python_provide:%python_provide python3-pytest-mock}
|
||||||
|
|
||||||
@ -44,35 +32,37 @@ it also provides other nice utilities.
|
|||||||
rm -rf *.egg-info
|
rm -rf *.egg-info
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
%py3_install
|
||||||
%py2_install
|
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
PYTHONPATH="$(pwd)" py.test-%{python2_version} test_pytest_mock.py
|
/usr/bin/pytest --assert=plain
|
||||||
PYTHONPATH="$(pwd)" py.test-%{python3_version} test_pytest_mock.py
|
|
||||||
|
|
||||||
%files -n python2-pytest-mock
|
|
||||||
%doc README.rst
|
|
||||||
%license LICENSE
|
|
||||||
%{python2_sitelib}/pytest_mock-%{version}-py%{python2_version}.egg-info/
|
|
||||||
%{python2_sitelib}/pytest_mock.py*
|
|
||||||
%{python2_sitelib}/_pytest_mock_version.py*
|
|
||||||
|
|
||||||
|
|
||||||
%files -n python3-pytest-mock
|
%files -n python3-pytest-mock
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python3_sitelib}/pytest_mock-%{version}-py%{python3_version}.egg-info/
|
%{python3_sitelib}/pytest_mock-%{version}-py%{python3_version}.egg-info/
|
||||||
%{python3_sitelib}/pytest_mock.py*
|
%{python3_sitelib}/pytest_mock/
|
||||||
%{python3_sitelib}/_pytest_mock_version.py*
|
|
||||||
%{python3_sitelib}/__pycache__/*
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 26 2022 caodongxia <caodongxia@h-partners.com> - 3.6.1-1
|
||||||
|
- update to 3.6.1
|
||||||
|
|
||||||
|
* Mon Jan 11 2021 maminjie <maminje1@huawei.com> - 1.10.0-8
|
||||||
|
- fix tests expectations with pytest4
|
||||||
|
|
||||||
|
* Tue Aug 11 2020 lingsheng <lingsheng@huawei.com> - 1.10.0-7
|
||||||
|
- Remove python2-pytest-mock subpackage
|
||||||
|
|
||||||
|
* Sun Jun 28 2020 lingsheng <lingsheng@huawei.com> - 1.10.0-6
|
||||||
|
- Tests handle new output format with Python 3.8
|
||||||
|
|
||||||
|
* Wed Jun 24 2020 lizhenhua <lizhenhua21@huawei.com> - 1.10.0-5
|
||||||
|
- Modify test cases for python3.8
|
||||||
|
|
||||||
* Wed Jan 08 2019 yangjian<yangjian79@huawei.com> - 1.10.0-4
|
* Wed Jan 08 2019 yangjian<yangjian79@huawei.com> - 1.10.0-4
|
||||||
- Package init
|
- Package init
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user