Skip to content

Commit

Permalink
Adjust leftovers addPointsV2 to addPoints
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Oct 30, 2017
1 parent ca74e39 commit bde014e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/src/python/test_qgsgeometry.py
Expand Up @@ -1423,7 +1423,7 @@ def testAddPart(self):
# test adding a part with Z values
point = QgsGeometry.fromPoint(points[0])
point.get().addZValue(4.0)
self.assertEqual(point.addPointsV2([QgsPoint(points[1][0], points[1][1], 3.0, wkbType=QgsWkbTypes.PointZ)]), 0)
self.assertEqual(point.addPoints([QgsPoint(points[1][0], points[1][1], 3.0, wkbType=QgsWkbTypes.PointZ)]), 0)
expwkt = "MultiPointZ ((0 0 4), (1 0 3))"
wkt = point.exportToWkt()
assert compareWkt(expwkt, wkt), "Expected:\n%s\nGot:\n%s\n" % (expwkt, wkt)
Expand Down Expand Up @@ -1453,7 +1453,7 @@ def testAddPart(self):
polyline = QgsGeometry.fromPolylineXY(points[0])
polyline.get().addZValue(4.0)
points2 = [QgsPoint(p[0], p[1], 3.0, wkbType=QgsWkbTypes.PointZ) for p in points[1]]
self.assertEqual(polyline.addPointsV2(points2), QgsGeometry.Success)
self.assertEqual(polyline.addPoints(points2), QgsGeometry.Success)
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))"
wkt = polyline.exportToWkt()
assert compareWkt(expwkt, wkt), "Expected:\n%s\nGot:\n%s\n" % (expwkt, wkt)
Expand Down Expand Up @@ -1497,7 +1497,7 @@ def testAddPart(self):
polygon = QgsGeometry.fromPolygon(points[0])
polygon.get().addZValue(4.0)
points2 = [QgsPoint(pi[0], pi[1], 3.0, wkbType=QgsWkbTypes.PointZ) for pi in points[1][0]]
self.assertEqual(polygon.addPointsV2(points2), QgsGeometry.Success)
self.assertEqual(polygon.addPoints(points2), QgsGeometry.Success)
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)))"
wkt = polygon.exportToWkt()
assert compareWkt(expwkt, wkt), "Expected:\n%s\nGot:\n%s\n" % (expwkt, wkt)
Expand Down

0 comments on commit bde014e

Please sign in to comment.