parent
699f0e6485
commit
fafe2df854
@ -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,
|
||||
)
|
||||
"""
|
||||
)
|
@ -1 +1 @@
|
||||
SHA512 (pytest-randomly-3.4.1.tar.gz) = 53da40628170566a1023c06759a039a96d4e943bd42bbc1df79f314e6a5a1f4a5e62456c48dbe8707f02f8bf46b1d0b9dbb179c7d751a8d6711b8f4cfb4fa619
|
||||
SHA512 (pytest-randomly-3.5.0.tar.gz) = 1ab57c45ccb858f243faf054fdaa1972ccb15dcedf98f2bcd88e105e888200f2eac0dc1c06940b09f00cf570437ddb92d82aa0ad35e9f51e3308d3723cdf4c6c
|
||||
|
Loading…
Reference in new issue