From fafe2df8541523d129e86d32f880321dde87959b Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: Sat, 12 Dec 2020 14:31:56 +1000 Subject: [PATCH] new upstream release 3.5.0, including license change to MIT --- .gitignore | 1 + ...-message-assertion-for-invalid-value.patch | 32 --------------- ....1-Fix-deprecation-warnings-in-tests.patch | 39 ------------------- python-pytest-randomly.spec | 17 ++++---- sources | 2 +- 5 files changed, 9 insertions(+), 82 deletions(-) delete mode 100644 0001-tests-fix-error-message-assertion-for-invalid-value.patch delete mode 100644 pytest-randomly-3.4.1-Fix-deprecation-warnings-in-tests.patch diff --git a/.gitignore b/.gitignore index 4a76793..c9a2958 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /pytest-randomly-3.3.1.tar.gz /pytest-randomly-3.4.0.tar.gz /pytest-randomly-3.4.1.tar.gz +/pytest-randomly-3.5.0.tar.gz diff --git a/0001-tests-fix-error-message-assertion-for-invalid-value.patch b/0001-tests-fix-error-message-assertion-for-invalid-value.patch deleted file mode 100644 index 82ce89f..0000000 --- a/0001-tests-fix-error-message-assertion-for-invalid-value.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 9e1d313fecc87662245607b4682835eb9a87cdac Mon Sep 17 00:00:00 2001 -From: Dan Callaghan -Date: Thu, 30 Jan 2020 18:09:18 +1000 -Subject: [PATCH] tests: fix error message assertion for invalid value - -This was failing in Fedora because the message we see is worded -differently to what the upstream test suite is expecting. - - E Failed: nomatch: "pytest: error: argument --randomly-seed: 'invalidvalue' is not an integer or the string 'last'" - E and: 'usage: pytest.py [options] [file_or_dir] [file_or_dir] [...]' - E and: "pytest.py: error: argument --randomly-seed: invalid int value: 'invalidvalue'" - E remains unmatched: "pytest: error: argument --randomly-seed: 'invalidvalue' is not an integer or the string 'last'" - -See also: -https://github.com/pytest-dev/pytest-randomly/issues/218#issuecomment-560501423 - -diff --git a/tests/test_pytest_randomly.py b/tests/test_pytest_randomly.py -index f81284d..13e15b1 100644 ---- a/tests/test_pytest_randomly.py -+++ b/tests/test_pytest_randomly.py -@@ -121,7 +121,7 @@ def test_passing_nonsense_for_randomly_seed(ourtestdir): - out.stderr.fnmatch_lines( - [ - ( -- "pytest: error: argument --randomly-seed: 'invalidvalue' " -+ "*: error: argument --randomly-seed: 'invalidvalue' " - + "is not an integer or the string 'last'" - ) - ] --- -2.21.1 - diff --git a/pytest-randomly-3.4.1-Fix-deprecation-warnings-in-tests.patch b/pytest-randomly-3.4.1-Fix-deprecation-warnings-in-tests.patch deleted file mode 100644 index dae283c..0000000 --- a/pytest-randomly-3.4.1-Fix-deprecation-warnings-in-tests.patch +++ /dev/null @@ -1,39 +0,0 @@ -Only in ./src: pytest_randomly.egg-info -diff -ru ../pytest-randomly-3.4.1.orig/tests/test_pytest_randomly.py ./tests/test_pytest_randomly.py ---- ../pytest-randomly-3.4.1.orig/tests/test_pytest_randomly.py 2020-08-20 11:54:50.721072606 -0500 -+++ ./tests/test_pytest_randomly.py 2020-08-20 12:02:17.275288884 -0500 -@@ -439,8 +439,8 @@ - - - class NoOpItem(pytest.Item): -- def __init__(self, path, parent, module=None): -- super(NoOpItem, self).__init__(path, parent) -+ def __init__(self, name, parent, module=None): -+ super(NoOpItem, self).__init__(name=name, parent=parent) - if module is not None: - self.module = module - -@@ -451,13 +451,19 @@ - def pytest_collect_file(path, parent): - if not str(path).endswith('.py'): - return -- return MyCollector( -+ return MyCollector.from_parent( -+ parent=parent, - fspath=str(path), - items=[ -- NoOpItem(str(path), parent, 'foo'), -- NoOpItem(str(path), parent), -+ NoOpItem.from_parent( -+ name=str(path) + "1", -+ parent=parent, module="foo" -+ ), -+ NoOpItem.from_parent( -+ name=str(path) + "2", -+ parent=parent, -+ ), - ], -- parent=parent, - ) - """ - ) diff --git a/python-pytest-randomly.spec b/python-pytest-randomly.spec index 0871d97..7d47a8d 100644 --- a/python-pytest-randomly.spec +++ b/python-pytest-randomly.spec @@ -2,19 +2,12 @@ %global module_name pytest_randomly Name: python-%{upstream_name} -Version: 3.4.1 -Release: 4%{?dist} +Version: 3.5.0 +Release: 1%{?dist} Summary: Pytest plugin to randomly order tests and control random.seed -License: BSD +License: MIT URL: https://github.com/pytest-dev/pytest-randomly Source0: https://files.pythonhosted.org/packages/source/p/%{upstream_name}/%{upstream_name}-%{version}.tar.gz -# Fedora-specific test fix to account for our version of pytest, -# not acceptable upstream: -# https://github.com/pytest-dev/pytest-randomly/issues/218 -Patch1: 0001-tests-fix-error-message-assertion-for-invalid-value.patch -# Cherry picked patch from upstream commit that fixes Rawhide FTBFS error -# https://github.com/pytest-dev/pytest-randomly/commit/c89ba6bb4458704f47e08d3f2fcc7cf0ebb8f9da -Patch2: pytest-randomly-3.4.1-Fix-deprecation-warnings-in-tests.patch BuildArch: noarch %description @@ -68,6 +61,10 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} PYTHONDONTWRITEBYTECODE=1 pytest-3 -p %{python3_sitelib}/%{module_name}*.egg-info %changelog +* Sat Dec 12 2020 Dan Callaghan - 3.5.0-1 +- new upstream release 3.5.0, including license change to MIT: + https://github.com/pytest-dev/pytest-randomly/blob/3.5.0/HISTORY.rst + * Thu Aug 20 2020 Merlin Mathesius - 3.4.1-4 - Fix Rawhide FTBFS error by pulling in upstream patch - Fix ELN FTBFS error by making minor conditional fixes diff --git a/sources b/sources index 250102c..bd47b99 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pytest-randomly-3.4.1.tar.gz) = 53da40628170566a1023c06759a039a96d4e943bd42bbc1df79f314e6a5a1f4a5e62456c48dbe8707f02f8bf46b1d0b9dbb179c7d751a8d6711b8f4cfb4fa619 +SHA512 (pytest-randomly-3.5.0.tar.gz) = 1ab57c45ccb858f243faf054fdaa1972ccb15dcedf98f2bcd88e105e888200f2eac0dc1c06940b09f00cf570437ddb92d82aa0ad35e9f51e3308d3723cdf4c6c