@@ -2338,13 +2338,13 @@ def testReshape(self):
2338
2338
g = QgsGeometry .fromWkt ('Polygon ((0 0, 1 0, 1 1, 0 1, 0 0))' )
2339
2339
expWkt = g .asWkt ()
2340
2340
g .reshapeGeometry (QgsLineString ([QgsPoint (0 , 0 ), QgsPoint (- 1 , - 1 )]))
2341
- assert compareWkt (g .asWkt (), expWkt ), "testReshape failed: mismatch Expected:\n %s\n Got:\n %s\n " % (expWkt , wkt )
2341
+ self . assertTrue ( compareWkt (g .asWkt (), expWkt ), "testReshape failed: mismatch Expected:\n %s\n Got:\n %s\n " % (expWkt , wkt ) )
2342
2342
2343
2343
# Test reshape a polygon with a line starting or ending at the polygon's first vertex
2344
2344
g = QgsGeometry .fromWkt ('Polygon ((0 0, 1 0, 1 1, 0 1, 0 0))' )
2345
- g .reshapeGeometry (QgsLineString ([QgsPoint (0 , 0 ), QgsPoint (0.5 , 0.5 ), QgsPoint (0 , 1 )]))
2345
+ self . assertEqual ( g .reshapeGeometry (QgsLineString ([QgsPoint (0 , 0 ), QgsPoint (0.5 , 0.5 ), QgsPoint (0 , 1 )])), QgsGeometry . Success )
2346
2346
expWkt = 'Polygon ((0 0, 1 0, 1 1, 0 1, 0.5 0.5, 0 0))'
2347
- assert compareWkt (g .asWkt (), expWkt ), "testReshape failed: mismatch Expected:\n %s\n Got:\n %s\n " % (expWkt , wkt )
2347
+ self . assertTrue ( compareWkt (g .asWkt (), expWkt ), "testReshape failed: mismatch Expected:\n %s\n Got:\n %s\n " % (expWkt , wkt ) )
2348
2348
2349
2349
# Test reshape a line from first/last vertex
2350
2350
g = QgsGeometry .fromWkt ('LineString (0 0, 5 0, 5 1)' )
0 commit comments