Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
(#18) Added a testDecompress case
Browse files Browse the repository at this point in the history
Test case for the decompress function.
  • Loading branch information
leandor committed Jul 1, 2017
1 parent f71fbd6 commit 161fbf2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/papi/test_lz4.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,10 @@ def testCompress(lz4, datadir):
assert len(output) == len(compressed_data)
assert output == compressed_data

def testDecompress(lz4, datadir):
uncompressed_data = datadir.join("testdata.txt").read_binary()
compressed_data = datadir.join("testdata-1.txt.lz4").read_binary()

output = lz4.decompress(compressed_data, len(uncompressed_data))
assert len(output) == len(uncompressed_data)
assert output == uncompressed_data

0 comments on commit 161fbf2

Please sign in to comment.