Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix avoid intersections test
  • Loading branch information
wonder-sk committed Jan 7, 2017
1 parent 0513bb3 commit 542c486
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/src/python/test_qgsgeometry_avoid_intersections.py
Expand Up @@ -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):
Expand All @@ -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)
Expand Down

0 comments on commit 542c486

Please sign in to comment.