Skip to content

Commit b01ff79

Browse files
committed
Download all test data before tests start
1 parent 4391a05 commit b01ff79

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/conftest.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,22 @@
1010
from astropy.utils import iers
1111

1212
from pyuvdata import UVCal, UVData
13-
from pyuvdata.datasets import fetch_data
13+
from pyuvdata.datasets import fetch_data, fetch_dict
1414
from pyuvdata.testing import check_warnings
1515

1616

17+
def pytest_sessionstart(session):
18+
"""Download test data prior to test collection."""
19+
if getattr(session.config, "workerinput", None) is not None:
20+
# No need to download, the master process has already done that.
21+
return
22+
23+
# download all the test data now to avoid clashes when running parallel tests
24+
# this is especially an issue in Windows
25+
for dname in fetch_dict:
26+
fetch_data(dname)
27+
28+
1729
@pytest.fixture(autouse=True, scope="session")
1830
def setup_and_teardown_package():
1931
"""Handle possible IERS issues."""

0 commit comments

Comments
 (0)