Skip to content

Commit

Permalink
Fix passing geometry compare options to checkLayersEqual
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 8, 2021
1 parent 5ad24de commit 3b57b53
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions python/plugins/processing/tests/AlgorithmsTestBase.py
Expand Up @@ -339,20 +339,13 @@ def check_results(self, results, context, params, expected):

compare = expected_result.get('compare', {})
pk = expected_result.get('pk', None)
topo_equal_check = expected_result.get('topo_equal_check', False)
ignore_part_order = expected_result.get('ignore_part_order', False)

geom_config = {
'topo_equal_check': topo_equal_check,
'ignore_part_order': ignore_part_order
}

if len(expected_lyrs) == 1:
self.assertLayersEqual(expected_lyrs[0], result_lyr, compare=compare, pk=pk, geometry=geom_config)
self.assertLayersEqual(expected_lyrs[0], result_lyr, compare=compare, pk=pk)
else:
res = False
for l in expected_lyrs:
if self.checkLayersEqual(l, result_lyr, compare=compare, pk=pk, geometry=geom_config):
if self.checkLayersEqual(l, result_lyr, compare=compare, pk=pk):
res = True
break
self.assertTrue(res, 'Could not find matching layer in expected results')
Expand Down

0 comments on commit 3b57b53

Please sign in to comment.