Skip to content

Commit 12a97de

Browse files
authored
Merge pull request #300 from eerovaher/rm-EarthLocation-get-site-registry
Avoid using the private `EarthLocation._get_site_registry()` in tests
2 parents fbded10 + ae55fed commit 12a97de

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

asdf_astropy/converters/coordinates/tests/test_earth_location.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
from astropy.coordinates.earth import ELLIPSOIDS
66
from astropy.units import Quantity
77

8-
from asdf_astropy.testing.helpers import assert_earth_location_equal
9-
108

119
def create_earth_locations():
1210
longitude = Longitude([0.0, 45.0, 90.0, 135.0, 180.0, -180, -90, -45], u.deg, wrap_angle=180 * u.deg)
@@ -33,24 +31,3 @@ def test_serialization(earth_location, tmp_path):
3331

3432
with asdf.open(file_path) as af:
3533
assert (af["earth_location"] == earth_location).all()
36-
37-
38-
@pytest.fixture
39-
def _builtin_site_registry():
40-
orig_sites = getattr(EarthLocation, "_site_registry", None)
41-
EarthLocation._get_site_registry(force_builtin=True)
42-
yield
43-
EarthLocation._site_registry = orig_sites
44-
45-
46-
@pytest.mark.usefixtures("_builtin_site_registry")
47-
def test_earthlocation_site(tmp_path):
48-
earth_location = EarthLocation.of_site("greenwich")
49-
50-
file_path = tmp_path / "test.asdf"
51-
with asdf.AsdfFile() as af:
52-
af["earth_location"] = earth_location
53-
af.write_to(file_path)
54-
55-
with asdf.open(file_path) as af:
56-
assert_earth_location_equal(af["earth_location"], earth_location)

0 commit comments

Comments
 (0)