Skip to content

Commit

Permalink
Merge pull request astropy#16577 from neutrinoceros/coordinates/tst/h…
Browse files Browse the repository at this point in the history
…otfix_remote_data_url_failure

TST: adjust a `coordinates` test to avoid hardcoding exact data source url
  • Loading branch information
mhvk committed Jun 19, 2024
2 parents c86243e + cee2cb3 commit 33bb428
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions astropy/coordinates/tests/test_name_resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
This module contains tests for the name resolve convenience module.
"""

import re
import time
import urllib.request

Expand Down Expand Up @@ -114,10 +113,8 @@ def test_names():
# "all" choice should ask for SIMBAD, then NED, then Vizier: "SNV" in the url
with pytest.raises(
NameResolveError,
match=re.escape(
"Unable to find coordinates for name 'm87h34hhh' "
"using https://cds.unistra.fr/cgi-bin/nph-sesame/SNV?m87h34hhh"
),
# avoid hard-coding an exact url as it might depend on external state
match=r"Unable to find coordinates for name 'm87h34hhh' using http.*SNV.*",
):
get_icrs_coordinates("m87h34hhh")

Expand Down

0 comments on commit 33bb428

Please sign in to comment.