@@ -2697,7 +2697,6 @@ def create_store(self):
26972697 with create_tmp_file () as tmp_file :
26982698 yield backends .H5NetCDFStore .open (tmp_file , "w" )
26992699
2700- @pytest .mark .filterwarnings ("ignore:complex dtypes are supported by h5py" )
27012700 @pytest .mark .parametrize (
27022701 "invalid_netcdf, warntype, num_warns" ,
27032702 [
@@ -2719,7 +2718,7 @@ def create_store(self):
27192718 def test_complex (self , invalid_netcdf , warntype , num_warns ):
27202719 expected = Dataset ({"x" : ("y" , np .ones (5 ) + 1j * np .ones (5 ))})
27212720 save_kwargs = {"invalid_netcdf" : invalid_netcdf }
2722- with pytest . warns ( warntype ) as record :
2721+ with warnings . catch_warnings ( record = True ) as record :
27232722 with self .roundtrip (expected , save_kwargs = save_kwargs ) as actual :
27242723 assert_equal (expected , actual )
27252724
@@ -2747,6 +2746,7 @@ def test_complex_error(self, invalid_netcdf):
27472746 with self .roundtrip (expected , save_kwargs = save_kwargs ) as actual :
27482747 assert_equal (expected , actual )
27492748
2749+ @pytest .mark .filterwarnings ("ignore:You are writing invalid netcdf features" )
27502750 def test_numpy_bool_ (self ):
27512751 # h5netcdf loads booleans as numpy.bool_, this type needs to be supported
27522752 # when writing invalid_netcdf datasets in order to support a roundtrip
0 commit comments