Skip to content

Commit 296c42f

Browse files
committed
More cautious availablility checking for zarr remote access test.
1 parent 7fce416 commit 296c42f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/integration/test_zarr_to_iris.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import iris
88
import pytest
99
import xarray as xr
10+
1011
from ncdata.iris_xarray import cubes_from_xarray as conversion_func
1112

1213

@@ -88,7 +89,12 @@ def _is_url_ok(url):
8889
"https://uor-aces-o.s3-ext.jc.rl.ac.uk/"
8990
"esmvaltool-zarr/pr_Amon_CNRM-ESM2-1_02Kpd-11_r1i1p2f2_gr_200601-220112.zarr3"
9091
)
91-
_S3_accessible = _is_url_ok(S3_TEST_PATH)
92+
93+
# Check 3 files, as we apparently sometimes get 'partial success'
94+
_S3_accessible = all(
95+
_is_url_ok(S3_TEST_PATH + subpath)
96+
for subpath in ["", "/.zattrs", "/.zmetadata"]
97+
)
9298

9399

94100
@pytest.mark.skipif(not _S3_accessible, reason="S3 url not accessible")

0 commit comments

Comments
 (0)