Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a test for the envelope() GeoQuerySet method

Refs #20718.
  • Loading branch information...
commit 6157192b6e15ca94734e56be6c71a4154c6015bd 1 parent b96f304
@claudep claudep authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 django/contrib/gis/tests/geoapp/tests.py
View
7 django/contrib/gis/tests/geoapp/tests.py
@@ -433,6 +433,13 @@ def test_diff_intersection_union(self):
self.assertEqual(c.mpoly.sym_difference(geom), c.sym_difference)
self.assertEqual(c.mpoly.union(geom), c.union)
+ @skipUnless(getattr(connection.ops, 'envelope', False), 'Database does not support envelope operation')
+ def test_envelope(self):
+ "Testing the `envelope` GeoQuerySet method."
+ countries = Country.objects.all().envelope()
+ for country in countries:
+ self.assertIsInstance(country.envelope, Polygon)
+
@no_mysql
@no_spatialite # SpatiaLite does not have an Extent function
def test_extent(self):
Please sign in to comment.
Something went wrong with that request. Please try again.