Skip to content

Commit 56e62cb

Browse files
authored
Merge pull request #98 from bcdev/forman-97-fix_ci
Fixed broken CI
2 parents 5a239f4 + 0691bdf commit 56e62cb

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

CHANGES.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
* Fixed link to _slice sources_ in documentation main page.
1212

13+
* Fixed broken CI. (#97)
14+
1315

1416
## Version 0.7.0 (from 2024-03-19)
1517

tests/config/test_validate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_validate_variable_fail(self):
4343
with pytest.raises(
4444
ValueError,
4545
match="Invalid configuration:"
46-
" 10 is not of type 'string'"
47-
" for variables.chl.dims.0",
46+
" [1-3]0 is not of type 'string'"
47+
" for variables.chl.dims.[0-2]",
4848
):
4949
validate_config(config)

tests/slice/test_cm.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
import unittest
88
import warnings
99

10+
try:
11+
# noinspection PyUnresolvedReferences
12+
import h5netcdf
13+
except ModuleNotFoundError:
14+
h5netcdf = None
1015
import pytest
1116
import xarray as xr
1217

@@ -22,9 +27,6 @@
2227
from tests.helpers import make_test_dataset
2328

2429

25-
# noinspection PyUnusedLocal
26-
27-
2830
# noinspection PyShadowingBuiltins,PyRedeclaration,PyMethodMayBeStatic
2931
class OpenSliceDatasetTest(unittest.TestCase):
3032
def setUp(self):
@@ -95,6 +97,7 @@ def test_slice_item_is_uri_of_memory_nc(self):
9597
# root cause. But it may be related to just the memory FS.
9698
warnings.warn(f"received known exception from to_netcdf(): {e}")
9799

100+
@unittest.skipIf(h5netcdf is None, reason="h5netcdf not installed")
98101
def test_slice_item_is_uri_of_local_fs_nc(self):
99102
engine = "h5netcdf"
100103
format = "NETCDF4"

tests/test_xrencoding.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def test_overlapping_chunks_in_data_and_encoding_raises(self):
130130
self.ds["v"] = self.ds.v.chunk(x=10)
131131
self.ds.v.encoding.update(chunks=(20,))
132132
with pytest.raises(
133-
NotImplementedError,
133+
(NotImplementedError, ValueError),
134134
match="Specified zarr chunks"
135135
" encoding\\['chunks'\\]=\\(20,\\)"
136136
" for variable named 'v'",

0 commit comments

Comments
 (0)