You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
python-pytest-randomly/pytest-randomly-3.4.1-Fix-d...

40 lines
1.5 KiB

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