Use reportinfo() instead of location in skipping message
This commit is contained in:
parent
9b423710aa
commit
16a44823eb
|
@ -168,9 +168,8 @@ def pytest_runtest_makereport(item, call):
|
||||||
# to point to the item definition, otherwise it will display
|
# to point to the item definition, otherwise it will display
|
||||||
# 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.reportinfo()[:2]
|
||||||
filename = item.config.rootdir.join(filename)
|
rep.longrepr = str(filename), line + 1, reason
|
||||||
rep.longrepr = filename, line + 1, reason
|
|
||||||
|
|
||||||
|
|
||||||
# called by terminalreporter progress reporting
|
# called by terminalreporter progress reporting
|
||||||
|
|
Loading…
Reference in New Issue