File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -274,12 +274,14 @@ def test_max_buffer_size():
274274 assert codec .max_buffer_size == 2 ** 31 - 1
275275 check_max_buffer_size (codec )
276276
277+
277278def test_typesize_explicit ():
278279 arr = np .arange (100 ).astype ("int64" )
279280 itemsize = arr .itemsize
280281 codec_no_type_size = Blosc (shuffle = Blosc .SHUFFLE )
281282 codec_itemsize = Blosc (shuffle = Blosc .SHUFFLE , typesize = itemsize )
282283 encoded_without_itemsize = codec_no_type_size .encode (arr .tobytes ())
283284 encoded_with_itemsize = codec_itemsize .encode (arr .tobytes ())
284- assert encoded_without_itemsize [3 ] == 1 # inferred from bytes i.e., 1
285- assert encoded_with_itemsize [3 ] == itemsize # given as a constructor argument
285+ # third byte encodes the `typesize`
286+ assert encoded_without_itemsize [3 ] == 1 # inferred from bytes i.e., 1
287+ assert encoded_with_itemsize [3 ] == itemsize # given as a constructor argument
You can’t perform that action at this time.
0 commit comments