Skip to content
Merged
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
7 changes: 7 additions & 0 deletions python_files/vscode_pytest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ def __init__(self, message):


def pytest_load_initial_conftests(early_config, parser, args): # noqa: ARG001
has_pytest_cov = early_config.pluginmanager.hasplugin("pytest_cov")
has_cov_arg = any("--cov" in arg for arg in args)
if has_cov_arg and not has_pytest_cov:
raise VSCodePytestError(
"\n \nERROR: pytest-cov is not installed, please install this before running pytest with coverage as pytest-cov is required. \n"
)

global TEST_RUN_PIPE
TEST_RUN_PIPE = os.getenv("TEST_RUN_PIPE")
error_string = (
Expand Down
Loading