@@ -399,27 +399,27 @@ async def test_chunks_initialized() -> None:
399
399
def test_nbytes_stored () -> None :
400
400
arr = zarr .create (shape = (100 ,), chunks = (10 ,), dtype = "i4" , codecs = [BytesCodec ()])
401
401
result = arr .nbytes_stored ()
402
- assert result == 366 # the size of the metadata document. This is a fragile test.
402
+ assert result == 502 # the size of the metadata document. This is a fragile test.
403
403
arr [:50 ] = 1
404
404
result = arr .nbytes_stored ()
405
- assert result == 566 # the size with 5 chunks filled.
405
+ assert result == 702 # the size with 5 chunks filled.
406
406
arr [50 :] = 2
407
407
result = arr .nbytes_stored ()
408
- assert result == 766 # the size with all chunks filled.
408
+ assert result == 902 # the size with all chunks filled.
409
409
410
410
411
411
async def test_nbytes_stored_async () -> None :
412
412
arr = await zarr .api .asynchronous .create (
413
413
shape = (100 ,), chunks = (10 ,), dtype = "i4" , codecs = [BytesCodec ()]
414
414
)
415
415
result = await arr .nbytes_stored ()
416
- assert result == 366 # the size of the metadata document. This is a fragile test.
416
+ assert result == 502 # the size of the metadata document. This is a fragile test.
417
417
await arr .setitem (slice (50 ), 1 )
418
418
result = await arr .nbytes_stored ()
419
- assert result == 566 # the size with 5 chunks filled.
419
+ assert result == 702 # the size with 5 chunks filled.
420
420
await arr .setitem (slice (50 , 100 ), 2 )
421
421
result = await arr .nbytes_stored ()
422
- assert result == 766 # the size with all chunks filled.
422
+ assert result == 902 # the size with all chunks filled.
423
423
424
424
425
425
def test_default_fill_values () -> None :
@@ -537,19 +537,19 @@ def test_info_complete(self, chunks: tuple[int, int], shards: tuple[int, int] |
537
537
_serializer = BytesCodec (),
538
538
_count_bytes = 512 ,
539
539
_count_chunks_initialized = 0 ,
540
- _count_bytes_stored = 373 if shards is None else 578 , # the metadata?
540
+ _count_bytes_stored = 521 if shards is None else 982 , # the metadata?
541
541
)
542
542
assert result == expected
543
543
544
544
arr [:4 , :4 ] = 10
545
545
result = arr .info_complete ()
546
546
if shards is None :
547
547
expected = dataclasses .replace (
548
- expected , _count_chunks_initialized = 4 , _count_bytes_stored = 501
548
+ expected , _count_chunks_initialized = 4 , _count_bytes_stored = 649
549
549
)
550
550
else :
551
551
expected = dataclasses .replace (
552
- expected , _count_chunks_initialized = 1 , _count_bytes_stored = 774
552
+ expected , _count_chunks_initialized = 1 , _count_bytes_stored = 1178
553
553
)
554
554
assert result == expected
555
555
@@ -624,21 +624,20 @@ async def test_info_complete_async(
624
624
_serializer = BytesCodec (),
625
625
_count_bytes = 512 ,
626
626
_count_chunks_initialized = 0 ,
627
- _count_bytes_stored = 373 if shards is None else 578 , # the metadata?
627
+ _count_bytes_stored = 521 if shards is None else 982 , # the metadata?
628
628
)
629
629
assert result == expected
630
630
631
631
await arr .setitem ((slice (4 ), slice (4 )), 10 )
632
632
result = await arr .info_complete ()
633
633
if shards is None :
634
634
expected = dataclasses .replace (
635
- expected , _count_chunks_initialized = 4 , _count_bytes_stored = 501
635
+ expected , _count_chunks_initialized = 4 , _count_bytes_stored = 553
636
636
)
637
637
else :
638
638
expected = dataclasses .replace (
639
- expected , _count_chunks_initialized = 1 , _count_bytes_stored = 774
639
+ expected , _count_chunks_initialized = 1 , _count_bytes_stored = 1178
640
640
)
641
- assert result == expected
642
641
643
642
644
643
@pytest .mark .parametrize ("store" , ["memory" ], indirect = True )
0 commit comments