Use reportinfo() instead of location in skipping message

This commit is contained in:
Bruno Oliveira 2020-05-04 19:09:29 -03:00
parent 9b423710aa
commit 16a44823eb
2 changed files with 2 additions and 3 deletions

View File

@ -168,9 +168,8 @@ def pytest_runtest_makereport(item, call):
# to point to the item definition, otherwise it will display
# 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
filename, line = item.reportinfo()[:2]
rep.longrepr = str(filename), line + 1, reason
# called by terminalreporter progress reporting