Skip to content

Commit

Permalink
add more handling for Vizier connection errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bhazelton authored and mkolopanis committed Jul 22, 2024
1 parent a9f6df5 commit 14a8f8e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ def test_download_gleam(tmp_path, stype):
assert sky.Ncomponents == 10

# check that the file is replaced if overwrite is True
skyutils.download_gleam(path=tmp_path, filename=fname, row_limit=5, overwrite=True)
try:
skyutils.download_gleam(
path=tmp_path, filename=fname, row_limit=5, overwrite=True
)
except requests.exceptions.ConnectionError:
pytest.skip("Connection error w/ Vizier")
sky2 = SkyModel()
sky2.read_gleam_catalog(filename, spectral_type=stype)
assert sky2.Ncomponents == 5
Expand Down

0 comments on commit 14a8f8e

Please sign in to comment.