Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fec14eb

Browse files
committedFeb 7, 2021
prepare for Node.fspath deprecation
calculate topdir based on config.rootpath/rootdir addresses pytest-dev/pytest#8251
1 parent ad99d94 commit fec14eb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎src/xdist/remote.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,14 @@ def run_one_test(self, torun):
9393
)
9494

9595
def pytest_collection_finish(self, session):
96+
try:
97+
topdir = str(self.config.rootpath)
98+
except AttributeError: # pytest <= 6.1.0
99+
topdir = str(self.config.rootdir)
100+
96101
self.sendevent(
97102
"collectionfinish",
98-
topdir=str(session.fspath),
103+
topdir=topdir,
99104
ids=[item.nodeid for item in session.items],
100105
)
101106

0 commit comments

Comments
 (0)
Please sign in to comment.