From 5b27e6f64b481be0fda0996456482eb56e12f2b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anssi=20K=C3=A4=C3=A4ri=C3=A4inen?= Date: Tue, 14 Aug 2012 15:28:55 +0300 Subject: [PATCH] [py3] Fixed comparison of list and range() A test compared list directly against a range(). This is py3 incompatible. Fixed by using list(range()). --- tests/regressiontests/queries/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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