From 3d80bd11aa107c8630f9ef8a1635aab23af7d72d Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 6 Sep 2022 17:43:26 +0200 Subject: [PATCH] topotests: ignore env for pytest --collect-only `--collect-only` does not run any tests, so bypass env checks for it. Signed-off-by: David Lamparter --- tests/topotests/conftest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/topotests/conftest.py b/tests/topotests/conftest.py index f79ca71a64..2a57f6c26e 100755 --- a/tests/topotests/conftest.py +++ b/tests/topotests/conftest.py @@ -232,6 +232,9 @@ def pytest_configure(config): Assert that the environment is correctly configured, and get extra config. """ + if config.getoption("--collect-only"): + return + if "PYTEST_XDIST_WORKER" not in os.environ: os.environ["PYTEST_XDIST_MODE"] = config.getoption("dist", "no") os.environ["PYTEST_TOPOTEST_WORKER"] = "" -- 2.39.5