Skip to content

Commit

Permalink
move iers pre-fetch to conftest.py from tox.ini (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram authored Aug 1, 2023
1 parent 1cdd106 commit 534f02e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 7 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import matplotlib
import pytest

matplotlib.use("Agg")


def pytest_configure(config):
# pre-cache the IERS file for astropy to prevent downloads
# which will cause errors with remote_data off
from astropy.utils.iers import IERS_Auto; IERS_Auto.open()
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ setenv =
extras = tests
commands =
pip freeze --all --no-input
# pre-cache the IERS file for astropy to prevent downloads with remote_data off
python -c 'from astropy.utils.iers import IERS_Auto; IERS_Auto.open()'
{env:PYTEST_COMMAND} {posargs}
description =
run tests
Expand Down

0 comments on commit 534f02e

Please sign in to comment.