summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Chaumeny <thomas.chaumeny@polyconseil.fr>2014-09-24 18:58:00 +0200
committerTim Graham <timograham@gmail.com>2014-09-25 07:19:23 -0400
commit9f576dd54fafdd76aa250f8947cc76c7ae19216c (patch)
treeab9e13ba73e34067bda6da640f2e0a21d3abfa8a
parentac2e7f08d824a2586933697b9a121dbbc42ee640 (diff)
Added tolerance in equality testing to avoid random build failure
-rw-r--r--django/contrib/gis/tests/geoapp/tests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/contrib/gis/tests/geoapp/tests.py b/django/contrib/gis/tests/geoapp/tests.py
index 9888ba2b71..3d4cd3de9f 100644
--- a/django/contrib/gis/tests/geoapp/tests.py
+++ b/django/contrib/gis/tests/geoapp/tests.py
@@ -607,7 +607,9 @@ class GeoQuerySetTest(TestCase):
'-95.23506 38.971823,-87.650175 41.850385,-123.305196 48.462611)',
srid=4326
)
- self.assertEqual(ref_line, City.objects.make_line())
+ # We check for equality with a tolerance of 10e-5 which is a lower bound
+ # of the precisions of ref_line coordinates
+ self.assertTrue(ref_line.equals_exact(City.objects.make_line(), tolerance=10e-5))
@skipUnlessDBFeature("has_num_geom_method")
def test_num_geom(self):