From 034dfbfc057b6090f9f2589731b8f58a70e4f885 Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Mon, 9 Nov 2015 22:36:12 +0500 Subject: Fixed #25654 -- Added the GEOSGeometry.unary_union property. --- tests/gis_tests/geos_tests/test_geos.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') 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)): -- cgit v1.3