Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[py3] Fixed comparison of list and range()

A test compared list directly against a range(). This is py3
incompatible. Fixed by using list(range()).
  • Loading branch information...
commit 5b27e6f64b481be0fda0996456482eb56e12f2b5 1 parent 8fe0386
Anssi Kääriäinen authored August 14, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  tests/regressiontests/queries/tests.py
2  tests/regressiontests/queries/tests.py
@@ -806,7 +806,7 @@ def test_ticket9411(self):
806 806
         qs = Tag.objects.values_list('id', flat=True).order_by('id')
807 807
         qs.query.bump_prefix()
808 808
         first = qs[0]
809  
-        self.assertEqual(list(qs), range(first, first+5))
  809
+        self.assertEqual(list(qs), list(range(first, first+5)))
810 810
 
811 811
     def test_ticket8439(self):
812 812
         # Complex combinations of conjunctions, disjunctions and nullable

0 notes on commit 5b27e6f

Please sign in to comment.
Something went wrong with that request. Please try again.