Skip to content

Commit

Permalink
Merge pull request #3075 from elliterate/bugs/fix-skipping-plugin-rep…
Browse files Browse the repository at this point in the history
…orting

Assume not skipped by mark if attribute missing
  • Loading branch information
nicoddemus authored Jan 6, 2018
2 parents 06a1823 + 25b504b commit bc66f7e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Henk-Jaap Wagenaar
Hugo van Kemenade
Hui Wang (coldnight)
Ian Bicking
Ian Lesperance
Jaap Broekhuizen
Jan Balster
Janne Vanhala
Expand Down
2 changes: 1 addition & 1 deletion _pytest/skipping.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions changelog/3074.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix skipping plugin reporting hook when test aborted before plugin setup hook.

0 comments on commit bc66f7e

Please sign in to comment.