diff options
author | Dana Powers <dana.powers@gmail.com> | 2017-03-14 11:38:49 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2017-03-14 13:30:35 -0700 |
commit | a00f9ead161e8b05ac953b460950e42fa0e0b7d6 (patch) | |
tree | dccf6020c9f39ca1e7c4ee217a7594dd21e22dfc /test/test_codec.py | |
parent | fea10d9c169214af82303744069bdd6c66c4a2ef (diff) | |
download | kafka-python-a00f9ead161e8b05ac953b460950e42fa0e0b7d6.tar.gz |
Alter test skips: python-lz4 works on python26, but not pypy
Diffstat (limited to 'test/test_codec.py')
-rw-r--r-- | test/test_codec.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/test_codec.py b/test/test_codec.py index 906b53c..d31fc86 100644 --- a/test/test_codec.py +++ b/test/test_codec.py @@ -1,3 +1,6 @@ +from __future__ import absolute_import + +import platform import struct import pytest @@ -80,7 +83,8 @@ def test_snappy_encode_xerial(): assert compressed == to_ensure -@pytest.mark.skipif(not has_lz4(), reason="LZ4 not available") +@pytest.mark.skipif(not has_lz4() or platform.python_implementation() == 'PyPy', + reason="python-lz4 crashes on old versions of pypy") def test_lz4(): for i in xrange(1000): b1 = random_string(100).encode('utf-8') @@ -89,7 +93,8 @@ def test_lz4(): assert b1 == b2 -@pytest.mark.skipif(not has_lz4(), reason="LZ4 not available") +@pytest.mark.skipif(not has_lz4() or platform.python_implementation() == 'PyPy', + reason="python-lz4 crashes on old versions of pypy") def test_lz4_old(): for i in xrange(1000): b1 = random_string(100).encode('utf-8') @@ -98,8 +103,8 @@ def test_lz4_old(): assert b1 == b2 -@pytest.mark.xfail(reason="lz4tools library doesnt support incremental decompression") -@pytest.mark.skipif(not has_lz4(), reason="LZ4 not available") +@pytest.mark.skipif(not has_lz4() or platform.python_implementation() == 'PyPy', + reason="python-lz4 crashes on old versions of pypy") def test_lz4_incremental(): for i in xrange(1000): # lz4 max single block size is 4MB |