Skip to content

Commit 1d6a33a

Browse files
committed
handle change to astropy's EarthLocation._get_site_registry function
1 parent 1cd87a2 commit 1d6a33a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tests/conftest.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ def setup_and_teardown_package():
4545
iers.conf.auto_max_age = None
4646

4747
# Also ensure that we're downloading the site data from astropy
48-
EarthLocation._get_site_registry(force_download=True)
48+
try:
49+
# the parameter name was changed in astropy 8.0.0 as a part of fixing
50+
# the refresh_cache keyword on the various astropy site functions
51+
# This can be removed when we require astropy >= 8.0
52+
EarthLocation._get_site_registry(force_download=True)
53+
except TypeError:
54+
EarthLocation._get_site_registry(refresh_cache=True)
4955

5056
yield
5157

0 commit comments

Comments
 (0)