Skip to content
Permalink
Browse files

Fix avoid intersections test

  • Loading branch information
wonder-sk committed Jan 7, 2017
1 parent 0513bb3 commit 542c48650e13fde57c2b27b73351d10a4f974497
Showing with 1 addition and 3 deletions.
  1. +1 −3 tests/src/python/test_qgsgeometry_avoid_intersections.py
@@ -49,8 +49,6 @@ def testNoSliverPolygons(self):
# create a layer with some polygons that will be used as a source for "avoid intersections"
l = QgsVectorLayer('MultiPolygon', 'test_layer', 'memory')
assert l.isValid()
QgsProject.instance().addMapLayer(l)
QgsProject.instance().writeEntry("Digitizing", "/AvoidIntersectionsList", [l.id()])

features = []
for i, wkt in enumerate(feat_wkt):
@@ -64,7 +62,7 @@ def testNoSliverPolygons(self):
# create a geometry and remove its intersections with other geometries

g = QgsGeometry.fromWkt(newg_wkt)
assert g.avoidIntersections() == 0
assert g.avoidIntersections([l]) == 0

# the resulting multi-polygon must have exactly three parts
# (in QGIS 2.0 it has one more tiny part that appears at the border between two of the original polygons)

0 comments on commit 542c486

Please sign in to comment.
You can’t perform that action at this time.