prepare for Node.fspath deprecation
calculate topdir based on config.rootpath/rootdir addresses pytest-dev/pytest#8251
This commit is contained in:
@@ -93,9 +93,14 @@ class WorkerInteractor:
|
||||
)
|
||||
|
||||
def pytest_collection_finish(self, session):
|
||||
try:
|
||||
topdir = str(self.config.rootpath)
|
||||
except AttributeError: # pytest <= 6.1.0
|
||||
topdir = str(self.config.rootdir)
|
||||
|
||||
self.sendevent(
|
||||
"collectionfinish",
|
||||
topdir=str(session.fspath),
|
||||
topdir=topdir,
|
||||
ids=[item.nodeid for item in session.items],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user