@@ -58,9 +58,9 @@ def test_encode_decode_roundtrip_bytes_only(self) -> None:
5858 chain = ChunkTransform (codecs = (BytesCodec (),), array_spec = spec )
5959 nd_buf = _make_nd_buffer (arr )
6060
61- encoded = chain .encode_chunk (nd_buf )
61+ encoded = chain .encode (nd_buf )
6262 assert encoded is not None
63- decoded = chain .decode_chunk (encoded )
63+ decoded = chain .decode (encoded )
6464 np .testing .assert_array_equal (arr , decoded .as_numpy_array ())
6565
6666 def test_shape_dtype_no_aa_codecs (self ) -> None :
@@ -87,9 +87,9 @@ def test_encode_decode_roundtrip_with_compression(self) -> None:
8787 chain = ChunkTransform (codecs = (BytesCodec (), GzipCodec (level = 1 )), array_spec = spec )
8888 nd_buf = _make_nd_buffer (arr )
8989
90- encoded = chain .encode_chunk (nd_buf )
90+ encoded = chain .encode (nd_buf )
9191 assert encoded is not None
92- decoded = chain .decode_chunk (encoded )
92+ decoded = chain .decode (encoded )
9393 np .testing .assert_array_equal (arr , decoded .as_numpy_array ())
9494
9595 def test_encode_decode_roundtrip_with_transpose (self ) -> None :
@@ -104,9 +104,9 @@ def test_encode_decode_roundtrip_with_transpose(self) -> None:
104104 )
105105 nd_buf = _make_nd_buffer (arr )
106106
107- encoded = chain .encode_chunk (nd_buf )
107+ encoded = chain .encode (nd_buf )
108108 assert encoded is not None
109- decoded = chain .decode_chunk (encoded )
109+ decoded = chain .decode (encoded )
110110 np .testing .assert_array_equal (arr , decoded .as_numpy_array ())
111111
112112 def test_rejects_non_sync_codec (self ) -> None :
@@ -174,9 +174,9 @@ def test_compute_encoded_size_with_transpose(self) -> None:
174174 chain = ChunkTransform (codecs = (TransposeCodec (order = (1 , 0 )), BytesCodec ()), array_spec = spec )
175175 assert chain .compute_encoded_size (96 , spec ) == 96
176176
177- def test_encode_chunk_returns_none_propagation (self ) -> None :
177+ def test_encode_returns_none_propagation (self ) -> None :
178178 # When an AA codec returns None (signaling "this chunk is the fill value,
179- # don't store it"), encode_chunk must short-circuit and return None
179+ # don't store it"), encode must short-circuit and return None
180180 # instead of passing None into the next codec.
181181
182182 class NoneReturningAACodec (TransposeCodec ):
@@ -192,7 +192,7 @@ def _encode_sync(self, chunk_array: NDBuffer, chunk_spec: ArraySpec) -> NDBuffer
192192 )
193193 arr = np .arange (12 , dtype = "float64" ).reshape (3 , 4 )
194194 nd_buf = _make_nd_buffer (arr )
195- assert chain .encode_chunk (nd_buf ) is None
195+ assert chain .encode (nd_buf ) is None
196196
197197 def test_encode_decode_roundtrip_with_crc32c (self ) -> None :
198198 # Round-trip through BytesCodec + Crc32cCodec. Crc32c appends a checksum
@@ -203,9 +203,9 @@ def test_encode_decode_roundtrip_with_crc32c(self) -> None:
203203 chain = ChunkTransform (codecs = (BytesCodec (), Crc32cCodec ()), array_spec = spec )
204204 nd_buf = _make_nd_buffer (arr )
205205
206- encoded = chain .encode_chunk (nd_buf )
206+ encoded = chain .encode (nd_buf )
207207 assert encoded is not None
208- decoded = chain .decode_chunk (encoded )
208+ decoded = chain .decode (encoded )
209209 np .testing .assert_array_equal (arr , decoded .as_numpy_array ())
210210
211211 def test_encode_decode_roundtrip_int32 (self ) -> None :
@@ -216,7 +216,7 @@ def test_encode_decode_roundtrip_int32(self) -> None:
216216 chain = ChunkTransform (codecs = (BytesCodec (), ZstdCodec (level = 1 )), array_spec = spec )
217217 nd_buf = _make_nd_buffer (arr )
218218
219- encoded = chain .encode_chunk (nd_buf )
219+ encoded = chain .encode (nd_buf )
220220 assert encoded is not None
221- decoded = chain .decode_chunk (encoded )
221+ decoded = chain .decode (encoded )
222222 np .testing .assert_array_equal (arr , decoded .as_numpy_array ())
0 commit comments