Debian Codegraph @

debian/patches/0002-No-internet.patch

raw
1 From: Antonio Valentino <[email protected]>
2 Date: Sat, 27 Dec 2025 22:01:33 +0000
3 Subject: No internet
4
5 Forwarded: not-needed
6 ---
7 pytest.ini | 1 +
8 tests/test_fits.py | 2 ++
9 tests/test_grib.py | 3 +++
10 tests/test_hdf.py | 3 +++
11 4 files changed, 9 insertions(+)
12
13 diff --git a/pytest.ini b/pytest.ini
14 index e83bb17..2187902 100644
15 --- a/pytest.ini
16 +++ b/pytest.ini
17 @@ -1,2 +1,3 @@
18 [pytest]
19 asyncio_default_fixture_loop_scope=session
20 +markers=["remotedata"]
21 diff --git a/tests/test_fits.py b/tests/test_fits.py
22 index 78f9249..a26e840 100644
23 --- a/tests/test_fits.py
24 +++ b/tests/test_fits.py
25 @@ -15,6 +15,7 @@ range_im = os.path.join(testdir, "arange.fits")
26 var = os.path.join(testdir, "variable_length_table.fits")
27
28
29 [email protected]
30 def test_image():
31 # this one directly hits a remote server - should cache?
32 url = "https://fits.gsfc.nasa.gov/samples/WFPC2ASSNu5780205bx.fits"
33 @@ -39,6 +40,7 @@ def test_image():
34 assert (hdu == arr).all()
35
36
37 [email protected]
38 def test_ascii_table():
39 # this one directly hits a remote server - should cache?
40 url = "https://fits.gsfc.nasa.gov/samples/WFPC2u5780205r_c0fx.fits"
41 diff --git a/tests/test_grib.py b/tests/test_grib.py
42 index 2c5387f..add7b5a 100644
43 --- a/tests/test_grib.py
44 +++ b/tests/test_grib.py
45 @@ -54,6 +54,7 @@ def _fetch_first(url):
46 return data
47
48
49 [email protected]
50 @pytest.mark.parametrize(
51 "url",
52 [
53 @@ -283,6 +284,7 @@ def test_parse_grib_idx_invalid_url():
54 )
55
56
57 [email protected]
58 def test_parse_grib_idx_no_file():
59 with pytest.raises(PermissionError):
60 # the url is spelled wrong
61 @@ -300,6 +302,7 @@ def test_parse_grib_idx_duplicate_attrs():
62 parse_grib_idx(fn, validate=True)
63
64
65 [email protected]
66 @pytest.mark.parametrize(
67 "idx_url, storage_options",
68 [
69 diff --git a/tests/test_hdf.py b/tests/test_hdf.py
70 index afaf6be..5c7b5ca 100644
71 --- a/tests/test_hdf.py
72 +++ b/tests/test_hdf.py
73 @@ -21,6 +21,7 @@ from kerchunk.utils import fs_as_store, refs_as_fs, refs_as_store
74 here = osp.dirname(__file__)
75
76
77 [email protected]
78 def test_single():
79 """Test creating references for a single HDF file"""
80 url = "s3://noaa-nwm-retro-v2.0-pds/full_physics/2017/201704010000.CHRTOUT_DOMAIN1.comp"
81 @@ -41,6 +42,7 @@ def test_single():
82 xr.testing.assert_equal(ds.drop_vars("crs"), expected.drop_vars("crs"))
83
84
85 [email protected]
86 def test_single_direct_open():
87 """Test creating references by passing the url directly to SingleHdf5ToZarr for a single HDF file"""
88 url = "s3://noaa-nwm-retro-v2.0-pds/full_physics/2017/201704010000.CHRTOUT_DOMAIN1.comp"
89 @@ -82,6 +84,7 @@ urls = [
90 so = dict(anon=True, default_fill_cache=False, default_cache_type="first")
91
92
93 [email protected]
94 def test_multizarr(generate_mzz):
95 """Test creating a combined reference file with MultiZarrToZarr"""
96 mzz = generate_mzz