Skip to content

Commit

Permalink
add test for checksum
Browse files Browse the repository at this point in the history
  • Loading branch information
normanrz committed Jun 24, 2024
1 parent 3d9673a commit 947dd2e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions numcodecs/tests/test_zstd.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,10 @@ def test_err_decode_object_buffer():

def test_err_encode_object_buffer():
check_err_encode_object_buffer(Zstd())


def test_checksum():
data = np.arange(0, 64, dtype="uint8")
assert len(Zstd(level=0, checksum=False).encode(data)) + 4 == len(
Zstd(level=0, checksum=True).encode(data)
)

0 comments on commit 947dd2e

Please sign in to comment.