Assume not skipped by mark if attribute missing

Fixes #3074.
This commit is contained in:
Ian Lesperance 2018-01-03 18:47:18 -05:00
parent 08997279f4
commit f24c470403
1 changed files with 1 additions and 1 deletions

View File

@ -261,7 +261,7 @@ def pytest_runtest_makereport(item, call):
else:
rep.outcome = "passed"
rep.wasxfail = explanation
elif item._skipped_by_mark and rep.skipped and type(rep.longrepr) is tuple:
elif getattr(item, '_skipped_by_mark', False) and rep.skipped and type(rep.longrepr) is tuple:
# skipped by mark.skipif; change the location of the failure
# to point to the item definition, otherwise it will display
# the location of where the skip exception was raised within pytest