Skip to content

Commit b03531c

Browse files
authored
Merge pull request #122 from jakirkham/fix_check_backwards_compatibility
Use `buffer_tobytes` on non-`object` types in test
2 parents c20f88f + 1d2fbf5 commit b03531c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

numcodecs/tests/common.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ def check_backwards_compatibility(codec_id, arrays, codecs, precision=None, pref
187187
# setup
188188
i = int(arr_fn.split('.')[-2])
189189
arr = np.load(arr_fn)
190-
arr_bytes = buffer_tobytes(arr)
191190
if arr.flags.f_contiguous:
192191
order = 'F'
193192
else:
@@ -233,7 +232,7 @@ def check_backwards_compatibility(codec_id, arrays, codecs, precision=None, pref
233232
assert_array_items_equal(arr, dec_arr)
234233
else:
235234
assert_array_equal(arr, dec_arr)
236-
assert arr_bytes == buffer_tobytes(dec)
235+
assert buffer_tobytes(arr) == buffer_tobytes(dec)
237236

238237

239238
def check_err_decode_object_buffer(compressor):

0 commit comments

Comments
 (0)