Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e64bab8

Browse files
elpasonyalldawson
authored andcommittedOct 9, 2023
Update test_qgsgeometry.py
1 parent dbc733b commit e64bab8

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed
 

‎tests/src/python/test_qgsgeometry.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7107,13 +7107,8 @@ def testIntersectsMultiPolygonEmptyRect(self):
71077107
self.assertTrue(poly.intersects(bbox)) # was failing here!
71087108

71097109
def testSplitGeometry(self):
7110-
"""
7111-
splitGeometry takes either QVector<QgsPoint> or QVector<QgsPointXY>
7112-
testing the overloaded methods until the QgsPointXY variant is removed in QGIS 4.0
7113-
this could be potentially removed in favor of the existing cpp test which will be sufficient
7114-
"""
7115-
square = QgsGeometry.fromWkt("Polygon ((0 0, 0 2, 2 2, 2 0, 0 0))")
7116-
line = [QgsPoint(1, -1), QgsPoint(1, 3)]
7110+
7111+
square = QgsGeometry.fromWkt("Polygon ((0 0, 0 2, 2 2, 2 0, 0 0))")
71177112
lineXY = [QgsPointXY(1, -1), QgsPointXY(1, 3)]
71187113

71197114
r1 = QgsGeometry.fromWkt("Polygon ((1 2, 1 0, 0 0, 0 2, 1 2))")
@@ -7125,12 +7120,6 @@ def testSplitGeometry(self):
71257120
self.assertEqual(len(parts), 1)
71267121
self.assertGeometriesEqual(parts[0], r1)
71277122

7128-
square = QgsGeometry.fromWkt("Polygon ((0 0, 0 2, 2 2, 2 0, 0 0))")
7129-
(result, parts, topo) = square.splitGeometry(line, False)
7130-
self.assertEqual(result, Qgis.GeometryOperationResult.Success)
7131-
self.assertGeometriesEqual(square, r2)
7132-
self.assertGeometriesEqual(parts[0], r1)
7133-
71347123
multilinestring = QgsGeometry.fromWkt("MultiLinestring((0 1, 1 0),(0 2, 2 0))")
71357124
blade = QgsCompoundCurve()
71367125
blade.addCurve(QgsLineString([QgsPointXY(0.8, 0.8), QgsPointXY(1.2, 1.2)]))

0 commit comments

Comments
 (0)
Please sign in to comment.