From: Antonio Valentino Date: Sat, 27 Dec 2025 22:01:33 +0000 Subject: No internet Forwarded: not-needed --- pytest.ini | 1 + tests/test_fits.py | 2 ++ tests/test_grib.py | 3 +++ tests/test_hdf.py | 3 +++ 4 files changed, 9 insertions(+) diff --git a/pytest.ini b/pytest.ini index e83bb17..2187902 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,2 +1,3 @@ [pytest] asyncio_default_fixture_loop_scope=session +markers=["remotedata"] diff --git a/tests/test_fits.py b/tests/test_fits.py index 78f9249..a26e840 100644 --- a/tests/test_fits.py +++ b/tests/test_fits.py @@ -15,6 +15,7 @@ range_im = os.path.join(testdir, "arange.fits") var = os.path.join(testdir, "variable_length_table.fits") +@pytest.mark.remotedata def test_image(): # this one directly hits a remote server - should cache? url = "https://fits.gsfc.nasa.gov/samples/WFPC2ASSNu5780205bx.fits" @@ -39,6 +40,7 @@ def test_image(): assert (hdu == arr).all() +@pytest.mark.remotedata def test_ascii_table(): # this one directly hits a remote server - should cache? url = "https://fits.gsfc.nasa.gov/samples/WFPC2u5780205r_c0fx.fits" diff --git a/tests/test_grib.py b/tests/test_grib.py index 2c5387f..add7b5a 100644 --- a/tests/test_grib.py +++ b/tests/test_grib.py @@ -54,6 +54,7 @@ def _fetch_first(url): return data +@pytest.mark.remotedata @pytest.mark.parametrize( "url", [ @@ -283,6 +284,7 @@ def test_parse_grib_idx_invalid_url(): ) +@pytest.mark.remotedata def test_parse_grib_idx_no_file(): with pytest.raises(PermissionError): # the url is spelled wrong @@ -300,6 +302,7 @@ def test_parse_grib_idx_duplicate_attrs(): parse_grib_idx(fn, validate=True) +@pytest.mark.remotedata @pytest.mark.parametrize( "idx_url, storage_options", [ diff --git a/tests/test_hdf.py b/tests/test_hdf.py index afaf6be..5c7b5ca 100644 --- a/tests/test_hdf.py +++ b/tests/test_hdf.py @@ -21,6 +21,7 @@ from kerchunk.utils import fs_as_store, refs_as_fs, refs_as_store here = osp.dirname(__file__) +@pytest.mark.remotedata def test_single(): """Test creating references for a single HDF file""" url = "s3://noaa-nwm-retro-v2.0-pds/full_physics/2017/201704010000.CHRTOUT_DOMAIN1.comp" @@ -41,6 +42,7 @@ def test_single(): xr.testing.assert_equal(ds.drop_vars("crs"), expected.drop_vars("crs")) +@pytest.mark.remotedata def test_single_direct_open(): """Test creating references by passing the url directly to SingleHdf5ToZarr for a single HDF file""" url = "s3://noaa-nwm-retro-v2.0-pds/full_physics/2017/201704010000.CHRTOUT_DOMAIN1.comp" @@ -82,6 +84,7 @@ urls = [ so = dict(anon=True, default_fill_cache=False, default_cache_type="first") +@pytest.mark.remotedata def test_multizarr(generate_mzz): """Test creating a combined reference file with MultiZarrToZarr""" mzz = generate_mzz