Skip to content

Commit 5da92be

Browse files
committed
Test location site coordinates specified with units.
1 parent 294cc3b commit 5da92be

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

astroquery/jplhorizons/tests/test_jplhorizons_remote.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,17 +361,23 @@ def test_vectors_query_raw(self):
361361

362362
assert len(res) >= 6412
363363

364-
def test_vectors_query_topocentric_coordinates(self):
364+
@pytest.mark.parametrize(
365+
"location",
366+
({"lon": 244, "lat": 33, "elevation": 1.7},
367+
{"lon": (244 * u.deg).to(u.rad), "lat": (33 * u.deg).to(u.rad), "elevation": 1700 * u.m},
368+
)
369+
)
370+
def test_vectors_query_topocentric_coordinates(self, location):
365371
"Test vectors query specifying observer's longitude, latitude, and elevation"
366372
q = jplhorizons.Horizons(id='Ceres',
367-
location={"lon": 244, "lat": 33, "elevation": 1700},
373+
location=location,
368374
id_type='smallbody',
369375
epochs=2451544.5)
370376
res = q.vectors_async()
371377
i = res.text.find("Center geodetic :")
372378
j = res.text.find("\n", i)
373379
parts = res.text[i:j].split()
374-
assert parts[3:6] == ['244.0,', '33.0,', '1700.0']
380+
assert parts[3:6] == ['244.0,', '33.0,', '1.7']
375381

376382
start = res.text.find("$$SOE")
377383
end = res.text.find("$$EOE")

0 commit comments

Comments
 (0)