new upstream release 3.5.0, including license change to MIT

epel9
Dan Callaghan 4 years ago
parent 699f0e6485
commit fafe2df854

1
.gitignore vendored

@ -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

@ -1,32 +0,0 @@
From 9e1d313fecc87662245607b4682835eb9a87cdac Mon Sep 17 00:00:00 2001
From: Dan Callaghan <dan.callaghan@opengear.com>
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

@ -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,
)
"""
)

@ -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 <djc@djc.id.au> - 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 <mmathesi@redhat.com> - 3.4.1-4
- Fix Rawhide FTBFS error by pulling in upstream patch
- Fix ELN FTBFS error by making minor conditional fixes

@ -1 +1 @@
SHA512 (pytest-randomly-3.4.1.tar.gz) = 53da40628170566a1023c06759a039a96d4e943bd42bbc1df79f314e6a5a1f4a5e62456c48dbe8707f02f8bf46b1d0b9dbb179c7d751a8d6711b8f4cfb4fa619
SHA512 (pytest-randomly-3.5.0.tar.gz) = 1ab57c45ccb858f243faf054fdaa1972ccb15dcedf98f2bcd88e105e888200f2eac0dc1c06940b09f00cf570437ddb92d82aa0ad35e9f51e3308d3723cdf4c6c

Loading…
Cancel
Save