Merge pull request #11915 from opensourcerouting/topotests-collect

topotests: ignore env for pytest --collect-only
This commit is contained in:
Donald Sharp 2022-09-07 12:59:26 -04:00 committed by GitHub
commit 97a0bfc5ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"] = ""