Relative path to invocationdir instead rootdir.
This commit is contained in:
1
changelog/7076.trivial.rst
Normal file
1
changelog/7076.trivial.rst
Normal file
@@ -0,0 +1 @@
|
|||||||
|
The path of file skipped by ``@pytest.mark.skip`` in the SKIPPED report is now relative to invocation directory. Previously it was relative to root directory.
|
||||||
@@ -169,6 +169,7 @@ def pytest_runtest_makereport(item, call):
|
|||||||
# the location of where the skip exception was raised within pytest
|
# the location of where the skip exception was raised within pytest
|
||||||
_, _, reason = rep.longrepr
|
_, _, reason = rep.longrepr
|
||||||
filename, line = item.location[:2]
|
filename, line = item.location[:2]
|
||||||
|
filename = item.config.rootdir.join(filename)
|
||||||
rep.longrepr = filename, line + 1, reason
|
rep.longrepr = filename, line + 1, reason
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user