When running the test suite with pytest --pyargs package -n 2, the content of the pytest_configure hook in conftest.py doesn't run:
def pytest_configure(config):
# Run in pytest_configure hook to avoid capturing stdout by pytest and
# inform user that the test data are being downloaded
# Workaround to avoid running it for each worker
worker_id = os.environ.get("PYTEST_XDIST_WORKER")
if worker_id is None:
print("Checking if test data need downloading...")
download_all()
print("All test data available.")
While it works fine when running pytest -n 2 from the tests folder.