Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions src/pytest_cov/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@

if hasattr(pytest, 'hookimpl'):
hookwrapper = pytest.hookimpl(hookwrapper=True)
tryfirst = pytest.hookimpl(tryfirst=True)
else:
hookwrapper = pytest.mark.hookwrapper
tryfirst = pytest.mark.tryfirst


class SessionWrapper:
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_cov/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def _prepare_cov_source(cov_source):
return None if True in cov_source else [path for path in cov_source if path is not True]


@pytest.mark.tryfirst
@compat.tryfirst
def pytest_load_initial_conftests(early_config, parser, args):
options = early_config.known_args_namespace
no_cov = options.no_cov_should_warn = False
Expand Down