Skip to content
Permalink
Browse files

Add test for handling invalid WKT with z values (refs #13055)

  • Loading branch information
nyalldawson committed Jul 15, 2015
1 parent 6de1a47 commit daa4d6a8fc77fe2aff41dc2ce324c3ddd0eddf03
Showing with 12 additions and 0 deletions.
  1. +12 −0 tests/src/python/test_qgsgeometry.py
@@ -1302,5 +1302,17 @@ def testRegression13053(self):
wkt = p.exportToWkt()
assert compareWkt( expWkt, wkt ), "testRegression13053 failed: mismatch Expected:\n%s\nGot:\n%s\n" % (expWkt, wkt )

def testRegression13055(self):
""" See http://hub.qgis.org/issues/13055
Testing that invalid WKT with z values but not using PolygonZ is still parsed
by QGIS.
"""
p = QgsGeometry.fromWkt('Polygon((0 0 0, 0 1 0, 1 1 0, 0 0 0 ))')
assert p is not None

expWkt ='Polygon ((0 0, 0 1, 1 1, 0 0))'
wkt = p.exportToWkt()
assert compareWkt( expWkt, wkt ), "testRegression13055 failed: mismatch Expected:\n%s\nGot:\n%s\n" % (expWkt, wkt )

if __name__ == '__main__':
unittest.main()

0 comments on commit daa4d6a

Please sign in to comment.
You can’t perform that action at this time.