From df5571933331fd7e49785afd3a8d4908aa97afa095b363a3c7fef06340fdf804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 9 Sep 2019 14:08:46 +0000 Subject: [PATCH] - Update to 3.1.0: * Add plugins via entry points pytest_randomly.random_seeder to allow outside packages to register additional random generators to seed. This has added a dependency on the entrypoints package. - Drop patch tests-restore-python2.7.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-randomly?expand=0&rev=10 --- pytest-randomly-3.0.0.tar.gz | 3 - pytest-randomly-3.1.0.tar.gz | 3 + python-pytest-randomly.changes | 9 +++ python-pytest-randomly.spec | 11 +-- tests-restore-python2.7.patch | 121 --------------------------------- 5 files changed, 18 insertions(+), 129 deletions(-) delete mode 100644 pytest-randomly-3.0.0.tar.gz create mode 100644 pytest-randomly-3.1.0.tar.gz delete mode 100644 tests-restore-python2.7.patch diff --git a/pytest-randomly-3.0.0.tar.gz b/pytest-randomly-3.0.0.tar.gz deleted file mode 100644 index a98a4b5..0000000 --- a/pytest-randomly-3.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:07b642e177c5921386fa36ee3995a4bda918a1d20b3806a4f397a02788f88331 -size 9416 diff --git a/pytest-randomly-3.1.0.tar.gz b/pytest-randomly-3.1.0.tar.gz new file mode 100644 index 0000000..19f6b98 --- /dev/null +++ b/pytest-randomly-3.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5facc2b5ac56e36b9c4bf14f49cc7b4c95427835bbf4a3c739b71a5f5f82d58a +size 10264 diff --git a/python-pytest-randomly.changes b/python-pytest-randomly.changes index 3d66785..774a2ab 100644 --- a/python-pytest-randomly.changes +++ b/python-pytest-randomly.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 09:20:12 UTC 2019 - Tomáš Chvátal + +- Update to 3.1.0: + * Add plugins via entry points pytest_randomly.random_seeder to allow + outside packages to register additional random generators to seed. + This has added a dependency on the entrypoints package. +- Drop patch tests-restore-python2.7.patch + ------------------------------------------------------------------- Mon Jun 3 09:13:50 UTC 2019 - Tomáš Chvátal diff --git a/python-pytest-randomly.spec b/python-pytest-randomly.spec index b636ba9..69595d0 100644 --- a/python-pytest-randomly.spec +++ b/python-pytest-randomly.spec @@ -16,26 +16,27 @@ # +%define skip_python2 1 %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pytest-randomly -Version: 3.0.0 +Version: 3.1.0 Release: 0 Summary: Pytest plugin to randomly order tests and control random.seed License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/adamchainz/pytest-randomly Source: https://files.pythonhosted.org/packages/source/p/pytest-randomly/pytest-randomly-%{version}.tar.gz -# Reverse of https://github.com/pytest-dev/pytest-randomly/commit/7ca48ad.patch -Patch0: tests-restore-python2.7.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-entrypoints Requires: python-pytest Recommends: python-Faker Suggests: python-numpy BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module Faker} +BuildRequires: %{python_module entrypoints} BuildRequires: %{python_module factory_boy} BuildRequires: %{python_module numpy} BuildRequires: %{python_module pytest} @@ -65,7 +66,6 @@ Features: %prep %setup -q -n pytest-randomly-%{version} -%patch0 -p1 # Disregard Python 3.4+ restriction sed -i '/python_requires/d' setup.py @@ -78,7 +78,8 @@ sed -i '/python_requires/d' setup.py %check export PYTHONDONTWRITEBYTECODE=true -%pytest +# test_entrypoint_injection needs installed module for pytest to use +%pytest -k 'not test_entrypoint_injection' %files %{python_files} %doc AUTHORS.rst README.rst diff --git a/tests-restore-python2.7.patch b/tests-restore-python2.7.patch deleted file mode 100644 index e8159ed..0000000 --- a/tests-restore-python2.7.patch +++ /dev/null @@ -1,121 +0,0 @@ ---- a/test_pytest_randomly.py -+++ b/test_pytest_randomly.py -@@ -1,6 +1,13 @@ -+# -*- encoding:utf-8 -*- -+from __future__ import absolute_import, division, print_function, unicode_literals -+ - import pytest -+import six - --pytest_plugins = ['pytester'] -+if six.PY3: -+ pytest_plugins = ['pytester'] -+else: -+ pytest_plugins = [b'pytester'] - - - @pytest.fixture -@@ -221,7 +228,11 @@ - test_c=code, - test_d=code, - ) -- args = ['-v', '--randomly-seed=15'] -+ args = ['-v'] -+ if six.PY3: # Python 3 random changes -+ args.append('--randomly-seed=15') -+ else: -+ args.append('--randomly-seed=41') - - out = ourtestdir.runpytest(*args) - -@@ -245,7 +256,11 @@ - test_c=code, - test_d=code, - ) -- args = ['-v', '--randomly-seed=15'] -+ args = ['-v'] -+ if six.PY3: # Python 3 random changes -+ args.append('--randomly-seed=15') -+ else: -+ args.append('--randomly-seed=41') - - args.append('--randomly-dont-reset-seed') - out = ourtestdir.runpytest(*args) -@@ -285,7 +300,11 @@ - pass - """ - ) -- args = ['-v', '--randomly-seed=15'] -+ args = ['-v'] -+ if six.PY3: # Python 3 random changes -+ args.append('--randomly-seed=15') -+ else: -+ args.append('--randomly-seed=41') - - out = ourtestdir.runpytest(*args) - -@@ -317,7 +336,11 @@ - pass - """ - ) -- args = ['-v', '--randomly-seed=15'] -+ args = ['-v'] -+ if six.PY3: # Python 3 random changes -+ args.append('--randomly-seed=15') -+ else: -+ args.append('--randomly-seed=41') - - out = ourtestdir.runpytest(*args) - -@@ -346,7 +369,11 @@ - pass - """ - ) -- args = ['-v', '--randomly-seed=15'] -+ args = ['-v'] -+ if six.PY3: # Python 3 random changes -+ args.append('--randomly-seed=15') -+ else: -+ args.append('--randomly-seed=41') - - out = ourtestdir.runpytest(*args) - -@@ -380,7 +407,11 @@ - pass - """ - ) -- args = ['-v', '--randomly-seed=15'] -+ args = ['-v'] -+ if six.PY3: # Python 3 random changes -+ args.append('--randomly-seed=15') -+ else: -+ args.append('--randomly-seed=41') - - out = ourtestdir.runpytest(*args) - -@@ -411,7 +442,11 @@ - return 9002 - """ - ) -- args = ['-v', '--doctest-modules', '--randomly-seed=5'] -+ args = ['-v', '--doctest-modules'] -+ if six.PY3: # Python 3 random changes -+ args.append('--randomly-seed=5') -+ else: -+ args.append('--randomly-seed=2') - - out = ourtestdir.runpytest(*args) - out.assert_outcomes(passed=2) -@@ -474,7 +509,11 @@ - >>> 2 - 2 - 0 - ''') -- args = ['-v', '--randomly-seed=1'] -+ args = ['-v'] -+ if six.PY3: # Python 3 random changes -+ args.append('--randomly-seed=1') -+ else: -+ args.append('--randomly-seed=4') - - out = ourtestdir.runpytest(*args) - out.assert_outcomes(passed=2)