8000 Add test for zero size input for block compress/decompress (#27) · python-lz4/python-lz4@96f2a89 · GitHub
[go: up one dir, main page]

Skip to content

Commit 96f2a89

Browse files
Add test for zero size input for block compress/decompress (#27)
1 parent 94c8473 commit 96f2a89

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_block.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
class TestLZ4Block(unittest.TestCase):
1010

11+
def test_empty_string(self):
12+
DATA = b''
13+
self.assertEqual(DATA, lz4.block.decompress(lz4.block.compress(DATA)))
14+
1115
def test_random(self):
1216
DATA = os.urandom(128 * 1024) # Read 128kb
1317
self.assertEqual(DATA, lz4.block.decompress(lz4.block.compress(DATA)))

0 commit comments

Comments
 (0)
0