Skip to content

Commit f8dd7be

Browse files
committed
run pre-commit
1 parent b6dd8cb commit f8dd7be

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

tests/integration/test_zarr_to_iris.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
11
"""Test conversion of remote and local Zarr store to iris Cube."""
2+
23
from importlib.resources import files as importlib_files
34
from pathlib import Path
45

56
import fsspec
67
import iris
78
import pytest
89
import xarray as xr
9-
import ncdata.iris_xarray
10-
1110
from ncdata.iris_xarray import cubes_from_xarray as conversion_func
1211

1312

1413
def _return_kwargs():
1514
time_coder = xr.coders.CFDatetimeCoder(use_cftime=True)
16-
xr_kwargs = {
17-
"consolidated": True,
18-
"decode_times": time_coder,
19-
"engine": "zarr",
20-
"chunks": {},
21-
"backend_kwargs": {},
15+
return {
16+
"consolidated": True,
17+
"decode_times": time_coder,
18+
"engine": "zarr",
19+
"chunks": {},
20+
"backend_kwargs": {},
2221
}
2322

24-
return xr_kwargs
25-
2623

2724
def _run_checks(cube):
2825
"""Run some standard checks."""
@@ -88,12 +85,14 @@ def _is_url_ok(url):
8885

8986
return valid_zarr
9087

88+
9189
S3_TEST_PATH = (
9290
"https://uor-aces-o.s3-ext.jc.rl.ac.uk/"
9391
"esmvaltool-zarr/pr_Amon_CNRM-ESM2-1_02Kpd-11_r1i1p2f2_gr_200601-220112.zarr3"
9492
)
9593
_S3_accessible = _is_url_ok(S3_TEST_PATH)
9694

95+
9796
@pytest.mark.skipif(not _S3_accessible, reason="S3 url not accessible")
9897
def test_load_remote_zarr():
9998
"""Test loading a remote Zarr store.

0 commit comments

Comments
 (0)