From c6d86b25be338b78c79ec9a0f20a365e67e36537 Mon Sep 17 00:00:00 2001 From: Jeff Widman Date: Mon, 22 Oct 2018 01:24:50 -0700 Subject: Vendor `six` consistently Use vendored `six`, and also `six.moves.range` rather than `xrange` --- test/test_consumer_integration.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/test_consumer_integration.py') 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) -- cgit v1.2.1