Skip to content

Commit

Permalink
Add test for zero size input for block compress/decompress (python#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanunderwood committed May 13, 2017
1 parent 94c8473 commit 96f2a89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

class TestLZ4Block(unittest.TestCase):

def test_empty_string(self):
DATA = b''
self.assertEqual(DATA, lz4.block.decompress(lz4.block.compress(DATA)))

def test_random(self):
DATA = os.urandom(128 * 1024) # Read 128kb
self.assertEqual(DATA, lz4.block.decompress(lz4.block.compress(DATA)))
Expand Down

0 comments on commit 96f2a89

Please sign in to comment.