diff options
author | Jeff Widman <jeff@jeffwidman.com> | 2018-10-22 01:24:50 -0700 |
---|---|---|
committer | Jeff Widman <jeff@jeffwidman.com> | 2018-10-22 14:30:33 -0700 |
commit | b83feeca2ec6f6ad745fb7ea47c6484304bb55d8 (patch) | |
tree | 7580e387521b388f3af629b9d25278faa26ee349 /test/test_consumer_integration.py | |
parent | a6be21e7b3a20ce2e25ef26140c43b59cc356f38 (diff) | |
download | kafka-python-b83feeca2ec6f6ad745fb7ea47c6484304bb55d8.tar.gz |
Vendor `six` consistently
Use vendored `six`, and also `six.moves.range` rather than `xrange`
Diffstat (limited to 'test/test_consumer_integration.py')
-rw-r--r-- | test/test_consumer_integration.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_consumer_integration.py b/test/test_consumer_integration.py index e6f1405..ce934ea 100644 --- a/test/test_consumer_integration.py +++ b/test/test_consumer_integration.py @@ -6,8 +6,8 @@ import pytest import kafka.codec import pytest -from six.moves import xrange -import six +from kafka.vendor.six.moves import range +from kafka.vendor import six from . import unittest from kafka import ( @@ -473,7 +473,7 @@ class TestConsumerIntegration(KafkaIntegrationTestCase): ) # Grab the first 195 messages - output_msgs1 = [ consumer1.get_message().message.value for _ in xrange(195) ] + output_msgs1 = [ consumer1.get_message().message.value for _ in range(195) ] self.assert_message_count(output_msgs1, 195) # The total offset across both partitions should be at 180 @@ -603,7 +603,7 @@ class TestConsumerIntegration(KafkaIntegrationTestCase): # Grab the first 180 messages output_msgs1 = [] - for _ in xrange(180): + for _ in range(180): m = next(consumer1) output_msgs1.append(m) self.assert_message_count(output_msgs1, 180) @@ -619,7 +619,7 @@ class TestConsumerIntegration(KafkaIntegrationTestCase): # 181-200 output_msgs2 = [] - for _ in xrange(20): + for _ in range(20): m = next(consumer2) output_msgs2.append(m) self.assert_message_count(output_msgs2, 20) |