Skip to content

Commit

Permalink
Skip ISH if root pages unreachable
Browse files Browse the repository at this point in the history
  • Loading branch information
zmoon committed Oct 7, 2024
1 parent b51c5f5 commit add54d5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_ish.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@

from monetio import ish

try:
import requests

requests.head("https://www1.ncdc.noaa.gov/pub/data/noaa/")
except Exception:
pytest.skip("NCEI server issues", allow_module_level=True)


def test_ish_read_history():
dates = pd.date_range("2020-09-01", "2020-09-02")
Expand Down
8 changes: 8 additions & 0 deletions tests/test_ish_lite.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@

from monetio import ish_lite

try:
import requests

r = requests.head("https://www1.ncdc.noaa.gov/pub/data/noaa/isd-lite/")
r.raise_for_status()
except Exception:
pytest.skip("NCEI server issues", allow_module_level=True)


def test_ish_read_history():
dates = pd.date_range("2020-09-01", "2020-09-02")
Expand Down

0 comments on commit add54d5

Please sign in to comment.