summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-09-10 13:30:04 -0400
committerTim Graham <timograham@gmail.com>2014-09-10 13:30:04 -0400
commit9a5fe5b29fd431431a53da63ad8825d878ee5878 (patch)
tree10e8f0a4679ee29956f9caf4167177c741d9fd2a
parentcc5e81c46d3e2d05ae06bda19995cdff3fc328fd (diff)
Added ordering to prevent non-deterministic test failure; refs #23099.
-rw-r--r--django/contrib/gis/tests/distapp/tests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/contrib/gis/tests/distapp/tests.py b/django/contrib/gis/tests/distapp/tests.py
index db63b94eab..5f898e3dda 100644
--- a/django/contrib/gis/tests/distapp/tests.py
+++ b/django/contrib/gis/tests/distapp/tests.py
@@ -117,13 +117,13 @@ class DistanceTest(TestCase):
# Testing using different variations of parameters and using models
# with different projected coordinate systems.
- dist1 = SouthTexasCity.objects.distance(lagrange, field_name='point')
- dist2 = SouthTexasCity.objects.distance(lagrange) # Using GEOSGeometry parameter
+ dist1 = SouthTexasCity.objects.distance(lagrange, field_name='point').order_by('id')
+ dist2 = SouthTexasCity.objects.distance(lagrange).order_by('id') # Using GEOSGeometry parameter
if spatialite or oracle:
dist_qs = [dist1, dist2]
else:
- dist3 = SouthTexasCityFt.objects.distance(lagrange.ewkt) # Using EWKT string parameter.
- dist4 = SouthTexasCityFt.objects.distance(lagrange)
+ dist3 = SouthTexasCityFt.objects.distance(lagrange.ewkt).order_by('id') # Using EWKT string parameter.
+ dist4 = SouthTexasCityFt.objects.distance(lagrange).order_by('id')
dist_qs = [dist1, dist2, dist3, dist4]
# Original query done on PostGIS, have to adjust AlmostEqual tolerance