Skip to content

Commit bde014e

Browse files
committedOct 30, 2017
Adjust leftovers addPointsV2 to addPoints
1 parent ca74e39 commit bde014e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎tests/src/python/test_qgsgeometry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,7 @@ def testAddPart(self):
14231423
# test adding a part with Z values
14241424
point = QgsGeometry.fromPoint(points[0])
14251425
point.get().addZValue(4.0)
1426-
self.assertEqual(point.addPointsV2([QgsPoint(points[1][0], points[1][1], 3.0, wkbType=QgsWkbTypes.PointZ)]), 0)
1426+
self.assertEqual(point.addPoints([QgsPoint(points[1][0], points[1][1], 3.0, wkbType=QgsWkbTypes.PointZ)]), 0)
14271427
expwkt = "MultiPointZ ((0 0 4), (1 0 3))"
14281428
wkt = point.exportToWkt()
14291429
assert compareWkt(expwkt, wkt), "Expected:\n%s\nGot:\n%s\n" % (expwkt, wkt)
@@ -1453,7 +1453,7 @@ def testAddPart(self):
14531453
polyline = QgsGeometry.fromPolylineXY(points[0])
14541454
polyline.get().addZValue(4.0)
14551455
points2 = [QgsPoint(p[0], p[1], 3.0, wkbType=QgsWkbTypes.PointZ) for p in points[1]]
1456-
self.assertEqual(polyline.addPointsV2(points2), QgsGeometry.Success)
1456+
self.assertEqual(polyline.addPoints(points2), QgsGeometry.Success)
14571457
expwkt = "MultiLineStringZ ((0 0 4, 1 0 4, 1 1 4, 2 1 4, 2 0 4),(3 0 3, 3 1 3, 5 1 3, 5 0 3, 6 0 3))"
14581458
wkt = polyline.exportToWkt()
14591459
assert compareWkt(expwkt, wkt), "Expected:\n%s\nGot:\n%s\n" % (expwkt, wkt)
@@ -1497,7 +1497,7 @@ def testAddPart(self):
14971497
polygon = QgsGeometry.fromPolygon(points[0])
14981498
polygon.get().addZValue(4.0)
14991499
points2 = [QgsPoint(pi[0], pi[1], 3.0, wkbType=QgsWkbTypes.PointZ) for pi in points[1][0]]
1500-
self.assertEqual(polygon.addPointsV2(points2), QgsGeometry.Success)
1500+
self.assertEqual(polygon.addPoints(points2), QgsGeometry.Success)
15011501
expwkt = "MultiPolygonZ (((0 0 4, 1 0 4, 1 1 4, 2 1 4, 2 2 4, 0 2 4, 0 0 4)),((4 0 3, 5 0 3, 5 2 3, 3 2 3, 3 1 3, 4 1 3, 4 0 3)))"
15021502
wkt = polygon.exportToWkt()
15031503
assert compareWkt(expwkt, wkt), "Expected:\n%s\nGot:\n%s\n" % (expwkt, wkt)

0 commit comments

Comments
 (0)
Please sign in to comment.