Skip to content

Commit

Permalink
Make test more robust across different geos/proj versions
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 19, 2024
1 parent 149096c commit 4cd8298
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/src/python/test_qgsvectorlayerprofilegenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3366,13 +3366,12 @@ def testVerticalLineGenerationFeatureTolerance(self):

result = results[0]
self.assertEqual(result.wkbType(), Qgis.WkbType.LineStringZ)
if Qgis.geosVersionMajor() == 3 and Qgis.geosVersionMinor() == 12:
expected_wkt = "LineStringZ (-347055.8 6632478.8 1, -347055.8 6632478.8 -22, -347055.8 6632478.8 1)"
else:
expected_wkt = "LineStringZ (-347054.8 6632479.6 1, -347054.8 6632479.6 -22, -347054.8 6632479.6 1)"
self.assertTrue(
compareWkt(expected_wkt, result.asWkt(), 0.1),
f"Expected: {expected_wkt}\nGot: {result.asWkt()}\n",
self.assertIn(
result.asWkt(1),
(
"LineString Z (-347055.8 6632478.8 1, -347055.8 6632478.8 -22, -347055.8 6632478.8 1)",
"LineString Z (-347054.8 6632479.6 1, -347054.8 6632479.6 -22, -347054.8 6632479.6 1)",
),
)

def test_vertical_transformation_4978_to_4985(self):
Expand Down

0 comments on commit 4cd8298

Please sign in to comment.