summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2015-11-09 22:36:12 +0500
committerTim Graham <timograham@gmail.com>2015-11-18 19:17:16 -0500
commit034dfbfc057b6090f9f2589731b8f58a70e4f885 (patch)
tree6d3d8a6437992f29ff17e2628ce667fe2c5924de /tests
parent1e35dd1a053b620f065101c02069c8e142ebf8ec (diff)
Fixed #25654 -- Added the GEOSGeometry.unary_union property.
Diffstat (limited to 'tests')
-rw-r--r--tests/gis_tests/geos_tests/test_geos.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/gis_tests/geos_tests/test_geos.py b/tests/gis_tests/geos_tests/test_geos.py
index d983af98ea..10077ae52e 100644
--- a/tests/gis_tests/geos_tests/test_geos.py
+++ b/tests/gis_tests/geos_tests/test_geos.py
@@ -582,6 +582,15 @@ class GEOSTest(SimpleTestCase, TestDataMixin):
a |= b # testing __ior__
self.assertEqual(u1, a)
+ def test_unary_union(self):
+ "Testing unary_union."
+ for i in range(len(self.geometries.topology_geoms)):
+ a = fromstr(self.geometries.topology_geoms[i].wkt_a)
+ b = fromstr(self.geometries.topology_geoms[i].wkt_b)
+ u1 = fromstr(self.geometries.union_geoms[i].wkt)
+ u2 = GeometryCollection(a, b).unary_union
+ self.assertTrue(u1.equals(u2))
+
def test_difference(self):
"Testing difference()."
for i in range(len(self.geometries.topology_geoms)):