Skip to content

Commit cb42207

Browse files
committed
Drop "incremental" marker.
Previous commits removed its two only uses, replaced by an autouse fixture. Other possible uses would be covered (with a more fine-grained approach) by pytest-dependency. This frees the global pytest_runtest_makereport hook for potential reuse. Signed-off-by: Yann Dirson <[email protected]>
1 parent 0017e49 commit cb42207

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

conftest.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,6 @@
1919
# need to import them in the global conftest.py so that they are recognized as fixtures.
2020
from pkgfixtures import formatted_and_mounted_ext4_disk, sr_disk_wiped
2121

22-
# *** Support for incremental tests in test classes ***
23-
# From https://stackoverflow.com/questions/12411431/how-to-skip-the-rest-of-tests-in-the-class-if-one-has-failed
24-
def pytest_runtest_makereport(item, call):
25-
if "incremental" in item.keywords:
26-
if call.excinfo is not None:
27-
parent = item.parent
28-
parent._previousfailed = item
29-
30-
def pytest_runtest_setup(item):
31-
previousfailed = getattr(item.parent, "_previousfailed", None)
32-
if previousfailed is not None:
33-
pytest.skip("previous test failed (%s)" % previousfailed.name)
34-
35-
# *** End of: Support for incremental tests ***
36-
3722
def pytest_addoption(parser):
3823
parser.addoption(
3924
"--hosts",

pytest.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ addopts = -ra --maxfail=1 -s
33
markers =
44
# *** Markers that change test behaviour ***
55
default_vm: mark a test with a default VM in case no --vm parameter was given.
6-
incremental: mark a class so that any test failure skips the rest of the tests in the class.
76

87
# *** Markers used to select tests at collect stage ***
98

0 commit comments

Comments
 (0)