Merge pull request #3075 from elliterate/bugs/fix-skipping-plugin-reporting
Assume not skipped by mark if attribute missing
This commit is contained in:
1
AUTHORS
1
AUTHORS
@@ -78,6 +78,7 @@ Henk-Jaap Wagenaar
|
||||
Hugo van Kemenade
|
||||
Hui Wang (coldnight)
|
||||
Ian Bicking
|
||||
Ian Lesperance
|
||||
Jaap Broekhuizen
|
||||
Jan Balster
|
||||
Janne Vanhala
|
||||
|
||||
@@ -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
|
||||
|
||||
1
changelog/3074.bugfix
Normal file
1
changelog/3074.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix skipping plugin reporting hook when test aborted before plugin setup hook.
|
||||
Reference in New Issue
Block a user