Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions nbval/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,3 +926,18 @@ def _indent(s, indent=' '):
if isinstance(s, str):
return '\n'.join(('%s%s' % (indent, line) for line in s.splitlines()))
return s


skip_modules = set()


@pytest.hookimpl(trylast=True)
def pytest_runtest_logreport(report):

if 'failed' in report.outcome:
skip_modules.add(Path(report.fspath).resolve())


def pytest_runtest_call(item):
if Path(item.path) in skip_modules:
pytest.skip(f"Due to the previous failure skipping rest of tests in {item.path}")
Loading