@@ -2868,8 +2868,11 @@ def test_append_with_new_variable(self) -> None:
28682868
28692869 # check append mode for new variable
28702870 with self .create_zarr_target () as store_target :
2871- xr .concat ([ds , ds_to_append ], dim = "time" ).to_zarr (
2872- store_target , mode = "w" , ** self .version_kwargs
2871+ combined = xr .concat ([ds , ds_to_append ], dim = "time" )
2872+ combined .to_zarr (store_target , mode = "w" , ** self .version_kwargs )
2873+ assert_identical (
2874+ combined ,
2875+ xr .open_dataset (store_target , engine = "zarr" , ** self .version_kwargs ),
28732876 )
28742877 ds_with_new_var .to_zarr (store_target , mode = "a" , ** self .version_kwargs )
28752878 combined = xr .concat ([ds , ds_to_append ], dim = "time" )
@@ -6494,7 +6497,7 @@ def test_zarr_safe_chunk_region(tmp_path):
64946497 arr .isel (a = slice (5 , - 1 )).chunk (a = 5 ).to_zarr (store , region = "auto" , mode = "r+" )
64956498
64966499 # Test if the code is detecting the last chunk correctly
6497- data = np .random .RandomState (0 ).randn ( 2920 , 25 , 53 )
6500+ data = np .random .default_rng (0 ).random (( 2920 , 25 , 53 ) )
64986501 ds = xr .Dataset ({"temperature" : (("time" , "lat" , "lon" ), data )})
64996502 chunks = {"time" : 1000 , "lat" : 25 , "lon" : 53 }
65006503 ds .chunk (chunks ).to_zarr (store , compute = False , mode = "w" )
0 commit comments