summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2012-08-17 17:08:33 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2012-11-15 00:01:24 +0100
commitb152ba79ab355c231b6e5fd852bad546e06208d9 (patch)
tree8ce318144cf3455acb60be2d93ffabd3d368fa21 /tests
parentd4fcbd31f192420898923ed9d8e956acaed8396e (diff)
downloadfactory-boy-b152ba79ab355c231b6e5fd852bad546e06208d9.tar
factory-boy-b152ba79ab355c231b6e5fd852bad546e06208d9.tar.gz
[py3] Rename xrange to range
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_using.py12
1 files changed, 6 insertions, 6 deletions
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)