@@ -2275,13 +2275,13 @@ def testReshape(self):
2275
2275
g = QgsGeometry .fromWkt ('Polygon ((0 0, 1 0, 1 1, 0 1, 0 0))' )
2276
2276
expWkt = g .asWkt ()
2277
2277
g .reshapeGeometry (QgsLineString ([QgsPoint (0 , 0 ), QgsPoint (- 1 , - 1 )]))
2278
- assert compareWkt (g .asWkt (), expWkt ), "testReshape failed: mismatch Expected:\n %s\n Got:\n %s\n " % (expWkt , wkt )
2278
+ self . assertTrue ( compareWkt (g .asWkt (), expWkt ), "testReshape failed: mismatch Expected:\n %s\n Got:\n %s\n " % (expWkt , wkt ) )
2279
2279
2280
2280
# Test reshape a polygon with a line starting or ending at the polygon's first vertex
2281
2281
g = QgsGeometry .fromWkt ('Polygon ((0 0, 1 0, 1 1, 0 1, 0 0))' )
2282
- g .reshapeGeometry (QgsLineString ([QgsPoint (0 , 0 ), QgsPoint (0.5 , 0.5 ), QgsPoint (0 , 1 )]))
2282
+ self . assertEqual ( g .reshapeGeometry (QgsLineString ([QgsPoint (0 , 0 ), QgsPoint (0.5 , 0.5 ), QgsPoint (0 , 1 )])), QgsGeometry . Success )
2283
2283
expWkt = 'Polygon ((0 0, 1 0, 1 1, 0 1, 0.5 0.5, 0 0))'
2284
- assert compareWkt (g .asWkt (), expWkt ), "testReshape failed: mismatch Expected:\n %s\n Got:\n %s\n " % (expWkt , wkt )
2284
+ self . assertTrue ( compareWkt (g .asWkt (), expWkt ), "testReshape failed: mismatch Expected:\n %s\n Got:\n %s\n " % (expWkt , wkt ) )
2285
2285
2286
2286
# Test reshape a line from first/last vertex
2287
2287
g = QgsGeometry .fromWkt ('LineString (0 0, 5 0, 5 1)' )
0 commit comments