@@ -3061,73 +3061,6 @@ def test_load_dataarray(self):
30613061 ds .to_netcdf (tmp )
30623062
30633063
3064- @requires_scipy_or_netCDF4
3065- @requires_dask
3066- class TestOpenMFDataSetDeprecation :
3067- """
3068- Set of tests to check that FutureWarnings are correctly raised until the
3069- deprecation cycle is complete. #2616
3070- """
3071-
3072- def test_open_mfdataset_default (self ):
3073- ds1 , ds2 = Dataset ({"x" : [0 ]}), Dataset ({"x" : [1 ]})
3074- with create_tmp_file () as tmp1 :
3075- with create_tmp_file () as tmp2 :
3076- ds1 .to_netcdf (tmp1 )
3077- ds2 .to_netcdf (tmp2 )
3078-
3079- with pytest .warns (
3080- FutureWarning , match = "default behaviour of" " `open_mfdataset`"
3081- ):
3082- open_mfdataset ([tmp1 , tmp2 ])
3083-
3084- def test_open_mfdataset_with_concat_dim (self ):
3085- ds1 , ds2 = Dataset ({"x" : [0 ]}), Dataset ({"x" : [1 ]})
3086- with create_tmp_file () as tmp1 :
3087- with create_tmp_file () as tmp2 :
3088- ds1 .to_netcdf (tmp1 )
3089- ds2 .to_netcdf (tmp2 )
3090-
3091- with pytest .warns (FutureWarning , match = "`concat_dim`" ):
3092- open_mfdataset ([tmp1 , tmp2 ], concat_dim = "x" )
3093-
3094- def test_auto_combine_with_merge_and_concat (self ):
3095- ds1 , ds2 = Dataset ({"x" : [0 ]}), Dataset ({"x" : [1 ]})
3096- ds3 = Dataset ({"z" : ((), 99 )})
3097- with create_tmp_file () as tmp1 :
3098- with create_tmp_file () as tmp2 :
3099- with create_tmp_file () as tmp3 :
3100- ds1 .to_netcdf (tmp1 )
3101- ds2 .to_netcdf (tmp2 )
3102- ds3 .to_netcdf (tmp3 )
3103-
3104- with pytest .warns (
3105- FutureWarning , match = "require both concatenation"
3106- ):
3107- open_mfdataset ([tmp1 , tmp2 , tmp3 ])
3108-
3109- def test_auto_combine_with_coords (self ):
3110- ds1 = Dataset ({"foo" : ("x" , [0 ])}, coords = {"x" : ("x" , [0 ])})
3111- ds2 = Dataset ({"foo" : ("x" , [1 ])}, coords = {"x" : ("x" , [1 ])})
3112- with create_tmp_file () as tmp1 :
3113- with create_tmp_file () as tmp2 :
3114- ds1 .to_netcdf (tmp1 )
3115- ds2 .to_netcdf (tmp2 )
3116-
3117- with pytest .warns (FutureWarning , match = "supplied have global" ):
3118- open_mfdataset ([tmp1 , tmp2 ])
3119-
3120- def test_auto_combine_without_coords (self ):
3121- ds1 , ds2 = Dataset ({"foo" : ("x" , [0 ])}), Dataset ({"foo" : ("x" , [1 ])})
3122- with create_tmp_file () as tmp1 :
3123- with create_tmp_file () as tmp2 :
3124- ds1 .to_netcdf (tmp1 )
3125- ds2 .to_netcdf (tmp2 )
3126-
3127- with pytest .warns (FutureWarning , match = "supplied do not have global" ):
3128- open_mfdataset ([tmp1 , tmp2 ])
3129-
3130-
31313064@requires_scipy_or_netCDF4
31323065@requires_pydap
31333066@pytest .mark .filterwarnings ("ignore:The binary mode of fromstring is deprecated" )
0 commit comments