Skip to content

Commit e97acf2

Browse files
authored
Merge pull request pandas-dev#554 from manahl/fix-broken-lz4-test
fix failed tests due to the new lz4 api
2 parents cf1deaf + a8f37d5 commit e97acf2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/integration/test_compress_integration.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
from __future__ import print_function
22
import random
3-
import lz4
3+
try:
4+
from lz4 import compressHC as lz4_compress, decompress as lz4_decompress
5+
except ImportError as e:
6+
from lz4.frame import compress as lz4_compress, decompress as lz4_decompress
7+
48
import string
59
import pytest
610
import six
@@ -24,7 +28,7 @@ def test_performance_sequential(n, length):
2428
c.decompressarr(c.compressarrHC(_strarr))
2529
clz4_time_p = (dt.now() - now).total_seconds()
2630
now = dt.now()
27-
[lz4.decompress(y) for y in [lz4.compressHC(x) for x in _strarr]]
31+
[lz4_decompress(y) for y in [lz4_compress(x) for x in _strarr]]
2832
lz4_time = (dt.now() - now).total_seconds()
2933
print()
3034
print("LZ4 Test %sx len:%s" % (n, length))

0 commit comments

Comments
 (0)