From 93af367238a768e1efde3d2b54e75b9a4a11b54ca98f306ec509b45ad9c6e523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Tue, 11 Sep 2018 13:42:31 +0000 Subject: [PATCH 1/3] Accepting request 634803 from home:mcepl:work - Add remove_mock.patch which makes use of mock from PyPI optional (all python 3 versions have unittest.mock these days) - Clean up SPEC file. - Remove unnecessary patch 0001-Use-unittest.mock-if-is-only-aviable.patch (it has been already included in 3.7.4) OBS-URL: https://build.opensuse.org/request/show/634803 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest?expand=0&rev=14 --- python-pytest-doc.changes | 11 +++++++++++ python-pytest-doc.spec | 2 ++ python-pytest.changes | 6 ++++++ python-pytest.spec | 3 +-- remove_mock.patch | 14 ++++++++++++++ 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 remove_mock.patch diff --git a/python-pytest-doc.changes b/python-pytest-doc.changes index 2514ea0..56a85ef 100644 --- a/python-pytest-doc.changes +++ b/python-pytest-doc.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Sep 10 22:43:26 CEST 2018 - Matěj Cepl + +- Add remove_mock.patch which makes use of mock from PyPI + optional (all python 3 versions have unittest.mock these days) + +------------------------------------------------------------------- +Tue Sep 4 16:12:26 UTC 2018 - Matěj Cepl + +- Clean up SPEC file. + ------------------------------------------------------------------- Tue Sep 4 12:55:25 UTC 2018 - Ondřej Súkup diff --git a/python-pytest-doc.spec b/python-pytest-doc.spec index bcc2a7d..4f7f352 100644 --- a/python-pytest-doc.spec +++ b/python-pytest-doc.spec @@ -25,6 +25,7 @@ License: MIT Group: Documentation/HTML URL: https://github.com/pytest-dev/pytest Source: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz +Patch: remove_mock.patch BuildRequires: %{python_module hypothesis} BuildRequires: %{python_module pytest = %{version}} BuildRequires: %{python_module setuptools_scm} @@ -44,6 +45,7 @@ testing tool. %prep %setup -q -n pytest-%{version} +%patch -p1 %build python3 setup.py build_sphinx diff --git a/python-pytest.changes b/python-pytest.changes index 413a798..056f31c 100644 --- a/python-pytest.changes +++ b/python-pytest.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Sep 4 16:10:55 UTC 2018 - Matěj Cepl + +- Remove unnecessary patch 0001-Use-unittest.mock-if-is-only-aviable.patch + (it has been already included in 3.7.4) + ------------------------------------------------------------------- Tue Sep 4 12:55:25 UTC 2018 - Ondřej Súkup diff --git a/python-pytest.spec b/python-pytest.spec index 033b9d7..e07c8ed 100644 --- a/python-pytest.spec +++ b/python-pytest.spec @@ -41,10 +41,9 @@ BuildArch: noarch %ifpython2 Requires: python-funcsigs %endif -%if "%python_flavor" == "python2" || %python3_version_nodots < 36 +%if "%{python_flavor}" == "python2" || %{python3_version_nodots} < 36 Requires: python-pathlib2 >= 2.2.0 %endif - %python_subpackages %description diff --git a/remove_mock.patch b/remove_mock.patch new file mode 100644 index 0000000..cd56c71 --- /dev/null +++ b/remove_mock.patch @@ -0,0 +1,14 @@ +--- a/testing/code/test_code.py ++++ b/testing/code/test_code.py +@@ -4,7 +4,10 @@ import sys + + import _pytest._code + import pytest +-import mock ++try: ++ import mock ++except ImportError: ++ import unittest.mock as mock + from test_excinfo import TWMock + from six import text_type + From aab09e1cd995b0a8ae71516d3e8020cd8737fcacfe162e14475ad33ba5793418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Mon, 17 Sep 2018 09:46:23 +0000 Subject: [PATCH 2/3] Accepting request 636145 from home:mimi_vx:branches:devel:languages:python:pytest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - update to 3.8.0 * Config.warn has been deprecated, it should be replaced by calls to the standard warnings.warn. * Node.warn now supports two signatures: + node.warn(PytestWarning("some message")): is now the recommended way to call this function. The warning instance must be a PytestWarning or subclass instance. + node.warn("CI", "some message"): this code/message form is now deprecated and should be converted to the warning instance form above. * RemovedInPytest4Warning and PytestExperimentalApiWarning are now part of the public API and should be accessed using pytest.RemovedInPytest4Warning and pytest.PytestExperimentalApiWarning. * @pytest.mark.filterwarnings second parameter is no longer regex-escaped, making it possible to actually use regular expressions to check the warning message. + Note: regex-escaping the match string was an implementation oversight that might break test suites which depend on the old behavior. * Internal pytest warnings are now issued using the standard warnings module, making it possible to use the standard warnings filters to manage those warnings. This introduces PytestWarning, PytestDeprecationWarning and RemovedInPytest4Warning warning types as part of the public API. * DeprecationWarning and PendingDeprecationWarning are now shown by default if no other warning filter is configured. This makes pytest more compliant with PEP-0506. See the docs for more info. * Warnings are now captured and displayed during test collection. * PYTEST_DISABLE_PLUGIN_AUTOLOAD environment variable disables plugin auto-loading when set. * Added the count option to console_output_style to enable displaying the progress as a count instead of a percentage. * Added support for ‘xfailed’ and ‘xpassed’ outcomes to the pytester.RunResult.assert_outcomes signature. OBS-URL: https://build.opensuse.org/request/show/636145 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest?expand=0&rev=15 --- pytest-3.7.4.tar.gz | 3 --- pytest-3.8.0.tar.gz | 3 +++ python-pytest-doc.changes | 34 ++++++++++++++++++++++++++++++++++ python-pytest-doc.spec | 4 ++-- python-pytest.changes | 34 ++++++++++++++++++++++++++++++++++ python-pytest.spec | 4 ++-- 6 files changed, 75 insertions(+), 7 deletions(-) delete mode 100644 pytest-3.7.4.tar.gz create mode 100644 pytest-3.8.0.tar.gz diff --git a/pytest-3.7.4.tar.gz b/pytest-3.7.4.tar.gz deleted file mode 100644 index d1ca116..0000000 --- a/pytest-3.7.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d7c49e931316cc7d1638a3e5f54f5d7b4e5225972b3c9838f3584788d27f349 -size 851863 diff --git a/pytest-3.8.0.tar.gz b/pytest-3.8.0.tar.gz new file mode 100644 index 0000000..ced6292 --- /dev/null +++ b/pytest-3.8.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8a07f84e680482eb51e244370aaf2caa6301ef265f37c2bdefb3dd3b663f99d +size 865922 diff --git a/python-pytest-doc.changes b/python-pytest-doc.changes index 56a85ef..c8ec4ab 100644 --- a/python-pytest-doc.changes +++ b/python-pytest-doc.changes @@ -1,3 +1,37 @@ +------------------------------------------------------------------- +Mon Sep 17 09:39:03 UTC 2018 - Ondřej Súkup + +- update to 3.8.0 + * Config.warn has been deprecated, it should be replaced by calls + to the standard warnings.warn. + * Node.warn now supports two signatures: + + node.warn(PytestWarning("some message")): is now the recommended way + to call this function. The warning instance must be a PytestWarning + or subclass instance. + + node.warn("CI", "some message"): this code/message form is now deprecated + and should be converted to the warning instance form above. + * RemovedInPytest4Warning and PytestExperimentalApiWarning are now part + of the public API and should be accessed using pytest.RemovedInPytest4Warning + and pytest.PytestExperimentalApiWarning. + * @pytest.mark.filterwarnings second parameter is no longer regex-escaped, + making it possible to actually use regular expressions to check the warning message. + + Note: regex-escaping the match string was an implementation oversight + that might break test suites which depend on the old behavior. + * Internal pytest warnings are now issued using the standard warnings module, + making it possible to use the standard warnings filters to manage those + warnings. This introduces PytestWarning, PytestDeprecationWarning + and RemovedInPytest4Warning warning types as part of the public API. + * DeprecationWarning and PendingDeprecationWarning are now shown by default + if no other warning filter is configured. This makes pytest more compliant + with PEP-0506. See the docs for more info. + * Warnings are now captured and displayed during test collection. + * PYTEST_DISABLE_PLUGIN_AUTOLOAD environment variable disables + plugin auto-loading when set. + * Added the count option to console_output_style to enable displaying + the progress as a count instead of a percentage. + * Added support for ‘xfailed’ and ‘xpassed’ outcomes + to the pytester.RunResult.assert_outcomes signature. + ------------------------------------------------------------------- Mon Sep 10 22:43:26 CEST 2018 - Matěj Cepl diff --git a/python-pytest-doc.spec b/python-pytest-doc.spec index 4f7f352..757c454 100644 --- a/python-pytest-doc.spec +++ b/python-pytest-doc.spec @@ -12,13 +12,13 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pytest-doc -Version: 3.7.4 +Version: 3.8.0 Release: 0 Summary: Documentation for python-pytest, a testing tool with autodiscovery License: MIT diff --git a/python-pytest.changes b/python-pytest.changes index 056f31c..edb50ed 100644 --- a/python-pytest.changes +++ b/python-pytest.changes @@ -1,3 +1,37 @@ +------------------------------------------------------------------- +Mon Sep 17 09:39:03 UTC 2018 - Ondřej Súkup + +- update to 3.8.0 + * Config.warn has been deprecated, it should be replaced by calls + to the standard warnings.warn. + * Node.warn now supports two signatures: + + node.warn(PytestWarning("some message")): is now the recommended way + to call this function. The warning instance must be a PytestWarning + or subclass instance. + + node.warn("CI", "some message"): this code/message form is now deprecated + and should be converted to the warning instance form above. + * RemovedInPytest4Warning and PytestExperimentalApiWarning are now part + of the public API and should be accessed using pytest.RemovedInPytest4Warning + and pytest.PytestExperimentalApiWarning. + * @pytest.mark.filterwarnings second parameter is no longer regex-escaped, + making it possible to actually use regular expressions to check the warning message. + + Note: regex-escaping the match string was an implementation oversight + that might break test suites which depend on the old behavior. + * Internal pytest warnings are now issued using the standard warnings module, + making it possible to use the standard warnings filters to manage those + warnings. This introduces PytestWarning, PytestDeprecationWarning + and RemovedInPytest4Warning warning types as part of the public API. + * DeprecationWarning and PendingDeprecationWarning are now shown by default + if no other warning filter is configured. This makes pytest more compliant + with PEP-0506. See the docs for more info. + * Warnings are now captured and displayed during test collection. + * PYTEST_DISABLE_PLUGIN_AUTOLOAD environment variable disables + plugin auto-loading when set. + * Added the count option to console_output_style to enable displaying + the progress as a count instead of a percentage. + * Added support for ‘xfailed’ and ‘xpassed’ outcomes + to the pytester.RunResult.assert_outcomes signature. + ------------------------------------------------------------------- Tue Sep 4 16:10:55 UTC 2018 - Matěj Cepl diff --git a/python-pytest.spec b/python-pytest.spec index e07c8ed..4abe1b4 100644 --- a/python-pytest.spec +++ b/python-pytest.spec @@ -12,13 +12,13 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pytest -Version: 3.7.4 +Version: 3.8.0 Release: 0 Summary: Python testing tool with autodiscovery and detailed asserts License: MIT From 1908c4bb4266a3a664920cb39d515187162bed50ce4814e8d6acb3d3c5436d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Mon, 24 Sep 2018 12:55:20 +0000 Subject: [PATCH 3/3] Accepting request 637650 from home:mimi_vx:branches:devel:languages:python:pytest - update to 3.8.1 - drop remove_mock.patch * .pytest_cache directory is now automatically ignored by Git * Fix the following error during collection of tests inside packages: 'TypeError: object of type 'Package' has no len()' * Fix bug where indirect parametrization would consider the scope of all fixtures used by the test function to determine the parametrization scope, and not only the scope of the fixtures being parametrized. * Fix crash of the assertion rewriter if a test changed the current working directory without restoring it afterwards. * Fix issue that prevented some caplog properties (for example record_tuples) from being available when entering the debugger with --pdb. * Fix UnicodeDecodeError in python2.x when a class returns a non-ascii binary __repr__ in an assertion which also contains non-ascii text. - update to 3.8.1 - drop remove_mock.patch * .pytest_cache directory is now automatically ignored by Git * Fix the following error during collection of tests inside packages: 'TypeError: object of type 'Package' has no len()' * Fix bug where indirect parametrization would consider the scope of all fixtures used by the test function to determine the parametrization scope, and not only the scope of the fixtures being parametrized. * Fix crash of the assertion rewriter if a test changed the current working directory without restoring it afterwards. * Fix issue that prevented some caplog properties (for example record_tuples) from being available when entering the debugger with --pdb. * Fix UnicodeDecodeError in python2.x when a class returns a non-ascii binary __repr__ in an assertion which also contains non-ascii text. OBS-URL: https://build.opensuse.org/request/show/637650 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest?expand=0&rev=16 --- pytest-3.8.0.tar.gz | 3 --- pytest-3.8.1.tar.gz | 3 +++ python-pytest-doc.changes | 18 ++++++++++++++++++ python-pytest-doc.spec | 4 +--- python-pytest.changes | 18 ++++++++++++++++++ python-pytest.spec | 2 +- remove_mock.patch | 14 -------------- 7 files changed, 41 insertions(+), 21 deletions(-) delete mode 100644 pytest-3.8.0.tar.gz create mode 100644 pytest-3.8.1.tar.gz delete mode 100644 remove_mock.patch diff --git a/pytest-3.8.0.tar.gz b/pytest-3.8.0.tar.gz deleted file mode 100644 index ced6292..0000000 --- a/pytest-3.8.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a8a07f84e680482eb51e244370aaf2caa6301ef265f37c2bdefb3dd3b663f99d -size 865922 diff --git a/pytest-3.8.1.tar.gz b/pytest-3.8.1.tar.gz new file mode 100644 index 0000000..b61d077 --- /dev/null +++ b/pytest-3.8.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95529588ff4e85114a0b0ad8e9cf0131ca47d46b28230e25366c5aba66b1d854 +size 867647 diff --git a/python-pytest-doc.changes b/python-pytest-doc.changes index c8ec4ab..667f23e 100644 --- a/python-pytest-doc.changes +++ b/python-pytest-doc.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Mon Sep 24 10:43:29 UTC 2018 - Ondřej Súkup + +- update to 3.8.1 +- drop remove_mock.patch + * .pytest_cache directory is now automatically ignored by Git + * Fix the following error during collection of tests inside packages: + 'TypeError: object of type 'Package' has no len()' + * Fix bug where indirect parametrization would consider the scope of all + fixtures used by the test function to determine the parametrization scope, + and not only the scope of the fixtures being parametrized. + * Fix crash of the assertion rewriter if a test changed the current working + directory without restoring it afterwards. + * Fix issue that prevented some caplog properties (for example record_tuples) + from being available when entering the debugger with --pdb. + * Fix UnicodeDecodeError in python2.x when a class returns a non-ascii binary + __repr__ in an assertion which also contains non-ascii text. + ------------------------------------------------------------------- Mon Sep 17 09:39:03 UTC 2018 - Ondřej Súkup diff --git a/python-pytest-doc.spec b/python-pytest-doc.spec index 757c454..f4b67ef 100644 --- a/python-pytest-doc.spec +++ b/python-pytest-doc.spec @@ -18,14 +18,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pytest-doc -Version: 3.8.0 +Version: 3.8.1 Release: 0 Summary: Documentation for python-pytest, a testing tool with autodiscovery License: MIT Group: Documentation/HTML URL: https://github.com/pytest-dev/pytest Source: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz -Patch: remove_mock.patch BuildRequires: %{python_module hypothesis} BuildRequires: %{python_module pytest = %{version}} BuildRequires: %{python_module setuptools_scm} @@ -45,7 +44,6 @@ testing tool. %prep %setup -q -n pytest-%{version} -%patch -p1 %build python3 setup.py build_sphinx diff --git a/python-pytest.changes b/python-pytest.changes index edb50ed..bb0a517 100644 --- a/python-pytest.changes +++ b/python-pytest.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Mon Sep 24 10:43:29 UTC 2018 - Ondřej Súkup + +- update to 3.8.1 +- drop remove_mock.patch + * .pytest_cache directory is now automatically ignored by Git + * Fix the following error during collection of tests inside packages: + 'TypeError: object of type 'Package' has no len()' + * Fix bug where indirect parametrization would consider the scope of all + fixtures used by the test function to determine the parametrization scope, + and not only the scope of the fixtures being parametrized. + * Fix crash of the assertion rewriter if a test changed the current working + directory without restoring it afterwards. + * Fix issue that prevented some caplog properties (for example record_tuples) + from being available when entering the debugger with --pdb. + * Fix UnicodeDecodeError in python2.x when a class returns a non-ascii binary + __repr__ in an assertion which also contains non-ascii text. + ------------------------------------------------------------------- Mon Sep 17 09:39:03 UTC 2018 - Ondřej Súkup diff --git a/python-pytest.spec b/python-pytest.spec index 4abe1b4..0ff3733 100644 --- a/python-pytest.spec +++ b/python-pytest.spec @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pytest -Version: 3.8.0 +Version: 3.8.1 Release: 0 Summary: Python testing tool with autodiscovery and detailed asserts License: MIT diff --git a/remove_mock.patch b/remove_mock.patch deleted file mode 100644 index cd56c71..0000000 --- a/remove_mock.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/testing/code/test_code.py -+++ b/testing/code/test_code.py -@@ -4,7 +4,10 @@ import sys - - import _pytest._code - import pytest --import mock -+try: -+ import mock -+except ImportError: -+ import unittest.mock as mock - from test_excinfo import TWMock - from six import text_type -