[Changeset] r11729 - django/trunk/django/contrib/gis/tests/geoapp

View: New views
1 Messages — Rating Filter:   Alert me  

[Changeset] r11729 - django/trunk/django/contrib/gis/tests/geoapp

by Django-3 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message


Author: jbronn
Date: 2009-11-09 21:51:05 -0600 (Mon, 09 Nov 2009)
New Revision: 11729

Modified:
   django/trunk/django/contrib/gis/tests/geoapp/test_regress.py
Log:
Fixed a brittle test case that was failing on PostGIS versions < 1.4.


Modified: django/trunk/django/contrib/gis/tests/geoapp/test_regress.py
===================================================================
--- django/trunk/django/contrib/gis/tests/geoapp/test_regress.py 2009-11-10 03:35:25 UTC (rev 11728)
+++ django/trunk/django/contrib/gis/tests/geoapp/test_regress.py 2009-11-10 03:51:05 UTC (rev 11729)
@@ -33,4 +33,6 @@
         "Testing `extent` on a table with a single point, see #11827."
         pnt = City.objects.get(name='Pueblo').point
         ref_ext = (pnt.x, pnt.y, pnt.x, pnt.y)
-        self.assertEqual(ref_ext, City.objects.filter(name='Pueblo').extent())
+        extent = City.objects.filter(name='Pueblo').extent()
+        for ref_val, val in zip(ref_ext, extent):
+            self.assertAlmostEqual(ref_val, val, 4)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django updates" group.
To post to this group, send email to django-updates@...
To unsubscribe from this group, send email to django-updates+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---