Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a non-deterministic test; refs #23099.

  • Loading branch information...
commit 135a58f9dc9dd121b8e3577538456fb15f63b897 1 parent 4926c0a
@timgraham timgraham authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/contrib/gis/tests/distapp/tests.py
View
4 django/contrib/gis/tests/distapp/tests.py
@@ -182,12 +182,12 @@ def test_distance_geodetic(self):
# Testing with spheroid distances first.
hillsdale = AustraliaCity.objects.get(name='Hillsdale')
- qs = AustraliaCity.objects.exclude(id=hillsdale.id).distance(hillsdale.point, spheroid=True)
+ qs = AustraliaCity.objects.exclude(id=hillsdale.id).distance(hillsdale.point, spheroid=True).order_by('id')
for i, c in enumerate(qs):
self.assertAlmostEqual(spheroid_distances[i], c.distance.m, tol)
if postgis:
# PostGIS uses sphere-only distances by default, testing these as well.
- qs = AustraliaCity.objects.exclude(id=hillsdale.id).distance(hillsdale.point)
+ qs = AustraliaCity.objects.exclude(id=hillsdale.id).distance(hillsdale.point).order_by('id')
for i, c in enumerate(qs):
self.assertAlmostEqual(sphere_distances[i], c.distance.m, tol)

0 comments on commit 135a58f

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