From b152ba79ab355c231b6e5fd852bad546e06208d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Barrois?= Date: Fri, 17 Aug 2012 17:08:33 +0200 Subject: [py3] Rename xrange to range MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaƫl Barrois --- tests/test_using.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/test_using.py') diff --git a/tests/test_using.py b/tests/test_using.py index 3658d28..112604d 100644 --- a/tests/test_using.py +++ b/tests/test_using.py @@ -1020,7 +1020,7 @@ class IteratorTestCase(unittest.TestCase): class TestObjectFactory(factory.Factory): FACTORY_FOR = TestObject - one = factory.Iterator(xrange(10, 30)) + one = factory.Iterator(range(10, 30)) objs = TestObjectFactory.build_batch(20) @@ -1031,7 +1031,7 @@ class IteratorTestCase(unittest.TestCase): class TestObjectFactory(factory.Factory): FACTORY_FOR = TestObject - one = factory.InfiniteIterator(xrange(5)) + one = factory.InfiniteIterator(range(5)) objs = TestObjectFactory.build_batch(20) @@ -1043,7 +1043,7 @@ class IteratorTestCase(unittest.TestCase): class TestObjectFactory(factory.Factory): FACTORY_FOR = TestObject - one = factory.InfiniteIterator([j * 3 for j in xrange(5)]) + one = factory.InfiniteIterator([j * 3 for j in range(5)]) # Scope bleeding: j will end up in TestObjectFactory's scope. @@ -1053,7 +1053,7 @@ class IteratorTestCase(unittest.TestCase): class TestObjectFactory(factory.Factory): FACTORY_FOR = TestObject - one = factory.InfiniteIterator([_j * 3 for _j in xrange(5)]) + one = factory.InfiniteIterator([_j * 3 for _j in range(5)]) # Scope bleeding : _j will end up in TestObjectFactory's scope. # But factory_boy ignores it, as a protected variable. @@ -1068,7 +1068,7 @@ class IteratorTestCase(unittest.TestCase): @factory.iterator def one(): - for i in xrange(10, 50): + for i in range(10, 50): yield i objs = TestObjectFactory.build_batch(20) @@ -1082,7 +1082,7 @@ class IteratorTestCase(unittest.TestCase): @factory.infinite_iterator def one(): - for i in xrange(5): + for i in range(5): yield i objs = TestObjectFactory.build_batch(20) -- cgit v1.2.3