From 9f576dd54fafdd76aa250f8947cc76c7ae19216c Mon Sep 17 00:00:00 2001 From: Thomas Chaumeny Date: Wed, 24 Sep 2014 18:58:00 +0200 Subject: [PATCH] Added tolerance in equality testing to avoid random build failure --- django/contrib/gis/tests/geoapp/tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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):