diff options
author | Jeff Widman <jeff@jeffwidman.com> | 2018-10-22 01:24:50 -0700 |
---|---|---|
committer | Jeff Widman <jeff@jeffwidman.com> | 2018-10-22 01:24:50 -0700 |
commit | c6d86b25be338b78c79ec9a0f20a365e67e36537 (patch) | |
tree | 356b2b35146b83407717bf6d79d2997017b67ba0 /test/test_consumer_integration.py | |
parent | 08c77499a2e8bc79d6788d70ef96d77752ed6325 (diff) | |
download | kafka-python-vendor-six-consistently.tar.gz |
Vendor `six` consistentlyvendor-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) |