Use python3 range.
Including potential memory reduction due to not created unnecessary lists.
This commit is contained in:
parent
ee0db7a50d
commit
bcd8674ef3
20 changed files with 66 additions and 46 deletions
|
|
@ -1,4 +1,6 @@
|
|||
from __future__ import absolute_import
|
||||
from builtins import range
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from .models import SharedMemoryModel
|
||||
|
|
@ -29,7 +31,7 @@ class SharedMemorysTest(TestCase):
|
|||
category = Category.objects.create(name="Category %d" % (n,))
|
||||
regcategory = RegularCategory.objects.create(name="Category %d" % (n,))
|
||||
|
||||
for n in xrange(0, 10):
|
||||
for n in range(0, 10):
|
||||
Article.objects.create(name="Article %d" % (n,), category=category, category2=regcategory)
|
||||
RegularArticle.objects.create(name="Article %d" % (n,), category=category, category2=regcategory)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue