Skip to content

Commit 69e423e

Browse files
committed
Add human readable size for No. bytes stored in info_complete
1 parent baabf08 commit 69e423e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/zarr/core/_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def __repr__(self) -> str:
133133

134134
if self._count_bytes_stored is not None:
135135
template += "\nNo. bytes stored : {_count_bytes_stored}"
136-
kwargs["_count_stored"] = byte_info(self._count_bytes_stored)
136+
kwargs["_count_bytes_stored"] = byte_info(self._count_bytes_stored)
137137

138138
if (
139139
self._count_bytes is not None

tests/test_info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_array_info(zarr_format: ZarrFormat) -> None:
7979

8080

8181
@pytest.mark.parametrize("zarr_format", ZARR_FORMATS)
82-
@pytest.mark.parametrize("bytes_things", [(1_000_000, "976.6K", 500_000, "500000", "2.0", 5)])
82+
@pytest.mark.parametrize("bytes_things", [(1_000_000, "976.6K", 500_000, "488.3K", "2.0", 5)])
8383
def test_array_info_complete(
8484
zarr_format: ZarrFormat, bytes_things: tuple[int, str, int, str, str, int]
8585
) -> None:
@@ -120,7 +120,7 @@ def test_array_info_complete(
120120
Serializer : BytesCodec(endian=<Endian.little: 'little'>)
121121
Compressors : ()
122122
No. bytes : {count_bytes} ({count_bytes_formatted})
123-
No. bytes stored : {count_bytes_stored_formatted}
123+
No. bytes stored : {count_bytes_stored} ({count_bytes_stored_formatted})
124124
Storage ratio : {storage_ratio_formatted}
125125
Chunks Initialized : 5""")
126126

0 commit comments

Comments
 (0)