From f24c470403aa0e34371850cb51a516a55dca7599 Mon Sep 17 00:00:00 2001 From: Ian Lesperance Date: Wed, 3 Jan 2018 18:47:18 -0500 Subject: [PATCH 1/3] Assume not skipped by mark if attribute missing Fixes #3074. --- _pytest/skipping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pytest/skipping.py b/_pytest/skipping.py index a1e5b4380..98fc51c7f 100644 --- a/_pytest/skipping.py +++ b/_pytest/skipping.py @@ -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 From 0a6e086f9def9830e66413fe65bf93de37af7b13 Mon Sep 17 00:00:00 2001 From: Ian Lesperance Date: Wed, 3 Jan 2018 18:53:32 -0500 Subject: [PATCH 2/3] Add changelog entry --- changelog/3074.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/3074.bugfix diff --git a/changelog/3074.bugfix b/changelog/3074.bugfix new file mode 100644 index 000000000..814f26ff1 --- /dev/null +++ b/changelog/3074.bugfix @@ -0,0 +1 @@ +Fix skipping plugin reporting hook when test aborted before plugin setup hook. From 25b504b4f02c75a96acfcccddde458ed78aac22d Mon Sep 17 00:00:00 2001 From: Ian Lesperance Date: Wed, 3 Jan 2018 18:54:49 -0500 Subject: [PATCH 3/3] Add self to authors list --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 0492a1659..1a138091e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -78,6 +78,7 @@ Henk-Jaap Wagenaar Hugo van Kemenade Hui Wang (coldnight) Ian Bicking +Ian Lesperance Jaap Broekhuizen Jan Balster Janne Vanhala