We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f188756 commit f3f9f7bCopy full SHA for f3f9f7b
conftest.py
@@ -21,6 +21,7 @@
21
import shlex
22
from pathlib import Path
23
from random import shuffle
24
+import shutil
25
26
import pytest
27
@@ -308,3 +309,12 @@ def pytest_generate_tests(metafunc: pytest.Metafunc) -> None:
308
309
310
test_ids = [" ".join(test_case) for test_case in test_cases]
311
metafunc.parametrize("test_id", test_ids)
312
+
313
314
+def pytest_configure(config: pytest.Config) -> None:
315
+ """
316
+ See https://docs.pytest.org/en/7.1.x/reference/reference.html#pytest.hookspec.pytest_configure
317
318
+ if config.getoption("valgrind"):
319
+ if shutil.which("valgrind") is None:
320
+ raise RuntimeError("Passed --valgrind, but valgrind could not be found.")
0 commit comments