Skip to content

Commit 6bfb6f8

Browse files
authored
Merge pull request #77 from oremanj/pytest-deprecation
2 parents eff5da8 + 8f29cff commit 6bfb6f8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ci/test-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pytest >= 3.1 # fixes a bug in handling async def test_* and turn warnings into errors.
1+
pytest >= 5.4 # for the Node.from_parent() transition
22
pytest-cov
33
pytest-trio
44
outcome

tests/python/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ def pytest_pycollect_makemodule(path, parent):
6969
)
7070
if candidate == expected:
7171
fspath = py.path.local(test_asyncio.__file__)
72-
return UnittestOnlyPackage(fspath, parent, nodeid=aio_test_nodeid(fspath))
72+
node = UnittestOnlyPackage.from_parent(parent, fspath=fspath)
73+
# This keeps all test names from showing as "."
74+
node._nodeid = aio_test_nodeid(fspath)
75+
return node
7376

7477

7578
def pytest_collection_modifyitems(items):

0 commit comments

Comments
 (0)