Skip to content

Commit 542c486

Browse files
committed
Fix avoid intersections test
1 parent 0513bb3 commit 542c486

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/src/python/test_qgsgeometry_avoid_intersections.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ def testNoSliverPolygons(self):
4949
# create a layer with some polygons that will be used as a source for "avoid intersections"
5050
l = QgsVectorLayer('MultiPolygon', 'test_layer', 'memory')
5151
assert l.isValid()
52-
QgsProject.instance().addMapLayer(l)
53-
QgsProject.instance().writeEntry("Digitizing", "/AvoidIntersectionsList", [l.id()])
5452

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

6664
g = QgsGeometry.fromWkt(newg_wkt)
67-
assert g.avoidIntersections() == 0
65+
assert g.avoidIntersections([l]) == 0
6866

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

0 commit comments

Comments
 (0)