diff options
Diffstat (limited to 'test/test_codec.py')
-rw-r--r-- | test/test_codec.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_codec.py b/test/test_codec.py index d31fc86..e132c1d 100644 --- a/test/test_codec.py +++ b/test/test_codec.py @@ -4,7 +4,7 @@ import platform import struct import pytest -from six.moves import xrange +from kafka.vendor.six.moves import range from kafka.codec import ( has_snappy, has_gzip, has_lz4, @@ -18,7 +18,7 @@ from test.testutil import random_string def test_gzip(): - for i in xrange(1000): + for i in range(1000): b1 = random_string(100).encode('utf-8') b2 = gzip_decode(gzip_encode(b1)) assert b1 == b2 @@ -26,7 +26,7 @@ def test_gzip(): @pytest.mark.skipif(not has_snappy(), reason="Snappy not available") def test_snappy(): - for i in xrange(1000): + for i in range(1000): b1 = random_string(100).encode('utf-8') b2 = snappy_decode(snappy_encode(b1)) assert b1 == b2 @@ -86,7 +86,7 @@ def test_snappy_encode_xerial(): @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): + for i in range(1000): b1 = random_string(100).encode('utf-8') b2 = lz4_decode(lz4_encode(b1)) assert len(b1) == len(b2) @@ -96,7 +96,7 @@ def test_lz4(): @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): + for i in range(1000): b1 = random_string(100).encode('utf-8') b2 = lz4_decode_old_kafka(lz4_encode_old_kafka(b1)) assert len(b1) == len(b2) @@ -106,7 +106,7 @@ def test_lz4_old(): @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): + for i in range(1000): # lz4 max single block size is 4MB # make sure we test with multiple-blocks b1 = random_string(100).encode('utf-8') * 50000 |