Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added comment in `geoapp` tests about PostGIS 2.0 change in ST_NumGeo…

…metries.
  • Loading branch information...
commit db78086b4540f968620ffe465174d7094267f04b 1 parent 950e618
Justin Bronn authored October 05, 2012

Showing 1 changed file with 6 additions and 3 deletions. Show diff stats Hide diff stats

  1. 9  django/contrib/gis/tests/geoapp/tests.py
9  django/contrib/gis/tests/geoapp/tests.py
@@ -575,10 +575,13 @@ def test_make_line(self):
575 575
     def test_num_geom(self):
576 576
         "Testing the `num_geom` GeoQuerySet method."
577 577
         # Both 'countries' only have two geometries.
578  
-        for c in Country.objects.num_geom(): self.assertEqual(2, c.num_geom)
  578
+        for c in Country.objects.num_geom():
  579
+            self.assertEqual(2, c.num_geom)
  580
+
579 581
         for c in City.objects.filter(point__isnull=False).num_geom():
580  
-            # Oracle will return 1 for the number of geometries on non-collections,
581  
-            # whereas PostGIS will return None.
  582
+            # Oracle and PostGIS 2.0+ will return 1 for the number of
  583
+            # geometries on non-collections, whereas PostGIS < 2.0.0
  584
+            # will return None.
582 585
             if postgis and connection.ops.spatial_version < (2, 0, 0):
583 586
                 self.assertIsNone(c.num_geom)
584 587
             else:

0 notes on commit db78086

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