Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jan 27, 2022
1 parent 2c656e6 commit 1322ab9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/src/python/test_qgsgeometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -6284,6 +6284,13 @@ def coerce_to_wkt(wkt, type):
QgsWkbTypes.MultiLineString),
['MultiLineString ((1 1, 1 2, 2 2, 1 1),(3 3, 4 3, 4 4, 3 3))'])

# Missing z values
self.assertEqual(coerce_to_wkt('Point (1 1)', QgsWkbTypes.PointZ),['PointZ (1 1 nan)'])
self.assertEqual(coerce_to_wkt('PointZ (1 1 3)', QgsWkbTypes.Point),['Point (1 1)'])
self.assertEqual(coerce_to_wkt('PointZ (1 1 nan)', QgsWkbTypes.PointZM),['PointZM (1 1 nan nan)'])
self.assertEqual(coerce_to_wkt('PointM (1 1 5)', QgsWkbTypes.PointZ),['PointZ (1 1 nan)'])
self.assertEqual(coerce_to_wkt('LineString (1 1, 1 2, 2 2, 1 1)', QgsWkbTypes.LineStringZM),['LineStringZM (1 1 nan nan, 1 2 nan nan, 2 2 nan nan, 1 1 nan nan)'])

def testTriangularWaves(self):
"""Test triangular waves"""
self.assertEqual(QgsGeometry.fromWkt('Point (1 1)').triangularWaves(1, 2).asWkt(3), 'Point (1 1)')
Expand Down

0 comments on commit 1322ab9

Please sign in to comment.