@@ -1867,7 +1867,7 @@ def test_chunk_encoding_with_dask(self):
1867
1867
# should fail if encoding["chunks"] clashes with dask_chunks
1868
1868
badenc = ds .chunk ({"x" : 4 })
1869
1869
badenc .var1 .encoding ["chunks" ] = (6 ,)
1870
- with raises_regex (NotImplementedError , "named 'var1' would overlap" ):
1870
+ with pytest . raises (NotImplementedError , match = r "named 'var1' would overlap" ):
1871
1871
with self .roundtrip (badenc ) as actual :
1872
1872
pass
1873
1873
@@ -1877,13 +1877,15 @@ def test_chunk_encoding_with_dask(self):
1877
1877
pass
1878
1878
1879
1879
badenc .var1 .encoding ["chunks" ] = (2 ,)
1880
- with raises_regex (NotImplementedError , "Specified Zarr chunk encoding" ):
1880
+ with pytest . raises (NotImplementedError , match = r "Specified Zarr chunk encoding" ):
1881
1881
with self .roundtrip (badenc ) as actual :
1882
1882
pass
1883
1883
1884
1884
badenc = badenc .chunk ({"x" : (3 , 3 , 6 )})
1885
1885
badenc .var1 .encoding ["chunks" ] = (3 ,)
1886
- with raises_regex (NotImplementedError , "incompatible with this encoding" ):
1886
+ with pytest .raises (
1887
+ NotImplementedError , match = r"incompatible with this encoding"
1888
+ ):
1887
1889
with self .roundtrip (badenc ) as actual :
1888
1890
pass
1889
1891
@@ -1906,7 +1908,7 @@ def test_chunk_encoding_with_dask(self):
1906
1908
# TODO: remove this failure once syncronized overlapping writes are
1907
1909
# supported by xarray
1908
1910
ds_chunk4 ["var1" ].encoding .update ({"chunks" : 5 })
1909
- with raises_regex (NotImplementedError , "named 'var1' would overlap" ):
1911
+ with pytest . raises (NotImplementedError , match = r "named 'var1' would overlap" ):
1910
1912
with self .roundtrip (ds_chunk4 ) as actual :
1911
1913
pass
1912
1914
# override option
0 commit comments