@@ -2697,7 +2697,6 @@ def create_store(self):
2697
2697
with create_tmp_file () as tmp_file :
2698
2698
yield backends .H5NetCDFStore .open (tmp_file , "w" )
2699
2699
2700
- @pytest .mark .filterwarnings ("ignore:complex dtypes are supported by h5py" )
2701
2700
@pytest .mark .parametrize (
2702
2701
"invalid_netcdf, warntype, num_warns" ,
2703
2702
[
@@ -2719,7 +2718,7 @@ def create_store(self):
2719
2718
def test_complex (self , invalid_netcdf , warntype , num_warns ):
2720
2719
expected = Dataset ({"x" : ("y" , np .ones (5 ) + 1j * np .ones (5 ))})
2721
2720
save_kwargs = {"invalid_netcdf" : invalid_netcdf }
2722
- with pytest . warns ( warntype ) as record :
2721
+ with warnings . catch_warnings ( record = True ) as record :
2723
2722
with self .roundtrip (expected , save_kwargs = save_kwargs ) as actual :
2724
2723
assert_equal (expected , actual )
2725
2724
@@ -2747,6 +2746,7 @@ def test_complex_error(self, invalid_netcdf):
2747
2746
with self .roundtrip (expected , save_kwargs = save_kwargs ) as actual :
2748
2747
assert_equal (expected , actual )
2749
2748
2749
+ @pytest .mark .filterwarnings ("ignore:You are writing invalid netcdf features" )
2750
2750
def test_numpy_bool_ (self ):
2751
2751
# h5netcdf loads booleans as numpy.bool_, this type needs to be supported
2752
2752
# when writing invalid_netcdf datasets in order to support a roundtrip
0 commit comments