Skip to content

Commit daa4d6a

Browse files
committedJul 16, 2015
Add test for handling invalid WKT with z values (refs #13055)
1 parent 6de1a47 commit daa4d6a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎tests/src/python/test_qgsgeometry.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,5 +1302,17 @@ def testRegression13053(self):
13021302
wkt = p.exportToWkt()
13031303
assert compareWkt( expWkt, wkt ), "testRegression13053 failed: mismatch Expected:\n%s\nGot:\n%s\n" % (expWkt, wkt )
13041304

1305+
def testRegression13055(self):
1306+
""" See http://hub.qgis.org/issues/13055
1307+
Testing that invalid WKT with z values but not using PolygonZ is still parsed
1308+
by QGIS.
1309+
"""
1310+
p = QgsGeometry.fromWkt('Polygon((0 0 0, 0 1 0, 1 1 0, 0 0 0 ))')
1311+
assert p is not None
1312+
1313+
expWkt ='Polygon ((0 0, 0 1, 1 1, 0 0))'
1314+
wkt = p.exportToWkt()
1315+
assert compareWkt( expWkt, wkt ), "testRegression13055 failed: mismatch Expected:\n%s\nGot:\n%s\n" % (expWkt, wkt )
1316+
13051317
if __name__ == '__main__':
13061318
unittest.main()

0 commit comments

Comments
 (0)
Please sign in to comment.