Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 19, 2024
1 parent 25fa2ec commit 522747c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/plugins/processing/tests/AlgorithmsTestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ def check_algorithm(self, name, defs):
# ignore user setting for invalid geometry handling
context = QgsProcessingContext()
context.setProject(QgsProject.instance())
if 'ellipsoid' in defs:
# depending on the project settings, we can't always rely
# on QgsProject.ellipsoid() returning the same ellipsoid as was
# specified in the test definition. So just force ensure that the
# context's ellipsoid is the desired one
context.setEllipsoid(defs['ellipsoid'])

if 'skipInvalid' in defs and defs['skipInvalid']:
context.setInvalidGeometryCheck(QgsFeatureRequest.GeometrySkipInvalid)
Expand Down

0 comments on commit 522747c

Please sign in to comment.