Skip to content

Commit

Permalink
TST: adjust a coordinates test to avoid hardcoding exact data sourc…
Browse files Browse the repository at this point in the history
…e url
  • Loading branch information
neutrinoceros committed Jun 19, 2024
1 parent c86243e commit cee2cb3
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 cee2cb3

Please sign in to comment.