summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnssi Kääriäinen <akaariai@gmail.com>2012-08-14 15:28:55 +0300
committerAnssi Kääriäinen <akaariai@gmail.com>2012-08-14 15:28:55 +0300
commit5b27e6f64b481be0fda0996456482eb56e12f2b5 (patch)
tree8455365fdf67a04774b3fb4a8d3007298616d7b8
parent8fe03865f7d7059e051976d1f9336f2ff83a30c6 (diff)
[py3] Fixed comparison of list and range()
A test compared list directly against a range(). This is py3 incompatible. Fixed by using list(range()).
-rw-r--r--tests/regressiontests/queries/tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/regressiontests/queries/tests.py b/tests/regressiontests/queries/tests.py
index 7eae302c51..53afd2bd93 100644
--- a/tests/regressiontests/queries/tests.py
+++ b/tests/regressiontests/queries/tests.py
@@ -806,7 +806,7 @@ class Queries1Tests(BaseQuerysetTest):
qs = Tag.objects.values_list('id', flat=True).order_by('id')
qs.query.bump_prefix()
first = qs[0]
- self.assertEqual(list(qs), range(first, first+5))
+ self.assertEqual(list(qs), list(range(first, first+5)))
def test_ticket8439(self):
# Complex combinations of conjunctions, disjunctions and nullable