diff --git a/tests/test_ish.py b/tests/test_ish.py index 4461cd82..80984fbd 100644 --- a/tests/test_ish.py +++ b/tests/test_ish.py @@ -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") diff --git a/tests/test_ish_lite.py b/tests/test_ish_lite.py index 94e9e75f..31aa4a24 100644 --- a/tests/test_ish_lite.py +++ b/tests/test_ish_lite.py @@ -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")