Relative path to invocationdir instead rootdir.

This commit is contained in:
Katarzyna
2020-05-03 22:56:38 +02:00
parent 80e5098408
commit 402ee6fb9d
2 changed files with 2 additions and 0 deletions

View File

@@ -169,6 +169,7 @@ def pytest_runtest_makereport(item, call):
# the location of where the skip exception was raised within pytest
_, _, reason = rep.longrepr
filename, line = item.location[:2]
filename = item.config.rootdir.join(filename)
rep.longrepr = filename, line + 1, reason