@@ -177,7 +177,8 @@ def drop_tsm(slice_ds: xr.Dataset) -> xr.Dataset:
177177
178178 target_dir = "memory://target.zarr"
179179 slices = [make_test_dataset (index = 3 * i ) for i in range (3 )]
180- zappend (slices , target_dir = target_dir , slice_source = drop_tsm )
180+ count = zappend (slices , target_dir = target_dir , slice_source = drop_tsm )
181+ self .assertEqual (3 , count )
181182 ds = xr .open_zarr (target_dir )
182183 self .assertEqual ({"time" : 9 , "y" : 50 , "x" : 100 }, ds .sizes )
183184 self .assertEqual ({"chl" }, set (ds .data_vars ))
@@ -196,7 +197,8 @@ def drop_tsm(slice_ds: xr.Dataset) -> xr.Dataset:
196197
197198 target_dir = "memory://target.zarr"
198199 slices = [make_test_dataset (index = 3 * i ) for i in range (3 )]
199- zappend (slices , target_dir = target_dir , slice_source = drop_tsm )
200+ count = zappend (slices , target_dir = target_dir , slice_source = drop_tsm )
201+ self .assertEqual (3 , count )
200202 ds = xr .open_zarr (target_dir )
201203 self .assertEqual ({"time" : 9 , "y" : 50 , "x" : 100 }, ds .sizes )
202204 self .assertEqual ({"chl" }, set (ds .data_vars ))
@@ -218,7 +220,8 @@ def crop_ds(slice_ds: xr.Dataset) -> xr.Dataset:
218220
219221 target_dir = "memory://target.zarr"
220222 slices = [make_test_dataset (index = 3 * i ) for i in range (3 )]
221- zappend (slices , target_dir = target_dir , slice_source = crop_ds )
223+ count = zappend (slices , target_dir = target_dir , slice_source = crop_ds )
224+ self .assertEqual (3 , count )
222225 ds = xr .open_zarr (target_dir )
223226 self .assertEqual ({"time" : 9 , "y" : 40 , "x" : 90 }, ds .sizes )
224227 self .assertEqual ({"chl" , "tsm" }, set (ds .data_vars ))
@@ -258,9 +261,10 @@ def crop_ds(slice_ds: xr.Dataset) -> xr.Dataset:
258261
259262 target_dir = "memory://target.zarr"
260263 slices = [make_test_dataset (index = 3 * i ) for i in range (3 )]
261- zappend (
264+ count = zappend (
262265 slices , target_dir = target_dir , slice_source = crop_ds , variables = variables
263266 )
267+ self .assertEqual (3 , count )
264268 ds = xr .open_zarr (target_dir )
265269 self .assertEqual ({"time" : 9 , "y" : 40 , "x" : 90 }, ds .sizes )
266270 self .assertEqual ({"chl" , "tsm" }, set (ds .data_vars ))
@@ -274,7 +278,8 @@ def crop_ds(slice_ds: xr.Dataset) -> xr.Dataset:
274278 def test_some_slices_with_inc_append_step (self ):
275279 target_dir = "memory://target.zarr"
276280 slices = [make_test_dataset (index = i , shape = (1 , 50 , 100 )) for i in range (3 )]
277- zappend (slices , target_dir = target_dir , append_step = "1D" )
281+ count = zappend (slices , target_dir = target_dir , append_step = "1D" )
282+ self .assertEqual (3 , count )
278283 ds = xr .open_zarr (target_dir )
279284 np .testing .assert_array_equal (
280285 ds .time .values ,
@@ -293,7 +298,8 @@ def test_some_slices_with_dec_append_step(self):
293298 slices = [
294299 make_test_dataset (index = i , shape = (1 , 50 , 100 )) for i in reversed (range (3 ))
295300 ]
296- zappend (slices , target_dir = target_dir , append_step = "-1D" )
301+ count = zappend (slices , target_dir = target_dir , append_step = "-1D" )
302+ self .assertEqual (3 , count )
297303 ds = xr .open_zarr (target_dir )
298304 np .testing .assert_array_equal (
299305 ds .time .values ,
@@ -416,7 +422,7 @@ def test_some_slices_with_dec_append_labels(self):
416422 def test_dynamic_attrs_with_one_slice (self ):
417423 target_dir = "memory://target.zarr"
418424 slices = [make_test_dataset ()]
419- zappend (
425+ count = zappend (
420426 slices ,
421427 target_dir = target_dir ,
422428 permit_eval = True ,
@@ -426,6 +432,7 @@ def test_dynamic_attrs_with_one_slice(self):
426432 "time_coverage_end" : "{{ ds.time[-1] }}" ,
427433 },
428434 )
435+ self .assertEqual (1 , count )
429436 ds = xr .open_zarr (target_dir )
430437 self .assertEqual (
431438 {
0 commit comments