Skip to content

Commit cf4ac27

Browse files
committed
Alter test skips: python-lz4 works on python26, but not pypy
1 parent 9ba21b8 commit cf4ac27

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

test/test_buffer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from __future__ import absolute_import
33

44
import io
5+
import platform
56

67
import pytest
78

@@ -34,7 +35,8 @@ def test_buffer_close():
3435
@pytest.mark.parametrize('compression', [
3536
'gzip',
3637
'snappy',
37-
pytest.mark.skipif("sys.version_info < (2,7)")('lz4'), # lz4tools does not work on py26
38+
pytest.mark.skipif(platform.python_implementation() == 'PyPy',
39+
reason='lz4 does not work on pypy')('lz4'),
3840
])
3941
def test_compressed_buffer_close(compression):
4042
records = MessageSetBuffer(io.BytesIO(), 100000, compression_type=compression)

test/test_producer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def test_end_to_end(kafka_broker, compression):
3131
# LZ4 requires 0.8.2
3232
if version() < (0, 8, 2):
3333
return
34-
# LZ4 python libs don't work on python2.6
35-
elif sys.version_info < (2, 7):
34+
# python-lz4 doesn't work on pypy yet
35+
elif platform.python_implementation() == 'PyPy':
3636
return
3737

3838
connect_str = 'localhost:' + str(kafka_broker.port)

0 commit comments

Comments
 (0)