Skip to content

Commit

Permalink
Alter test skips: python-lz4 works on python26, but not pypy
Browse files Browse the repository at this point in the history
  • Loading branch information
dpkp committed Mar 14, 2017
1 parent 9ba21b8 commit cf4ac27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion test/test_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from __future__ import absolute_import

import io
import platform

import pytest

Expand Down Expand Up @@ -34,7 +35,8 @@ def test_buffer_close():
@pytest.mark.parametrize('compression', [
'gzip',
'snappy',
pytest.mark.skipif("sys.version_info < (2,7)")('lz4'), # lz4tools does not work on py26
pytest.mark.skipif(platform.python_implementation() == 'PyPy',
reason='lz4 does not work on pypy')('lz4'),
])
def test_compressed_buffer_close(compression):
records = MessageSetBuffer(io.BytesIO(), 100000, compression_type=compression)
Expand Down
4 changes: 2 additions & 2 deletions test/test_producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def test_end_to_end(kafka_broker, compression):
# LZ4 requires 0.8.2
if version() < (0, 8, 2):
return
# LZ4 python libs don't work on python2.6
elif sys.version_info < (2, 7):
# python-lz4 doesn't work on pypy yet
elif platform.python_implementation() == 'PyPy':
return

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

0 comments on commit cf4ac27

Please sign in to comment.