Skip to content
Permalink
Browse files

Fix passing geometry compare options to checkLayersEqual

  • Loading branch information
nyalldawson committed Feb 8, 2021
1 parent 5ad24de commit 3b57b5385124fa8afbaa48f445b826fec8f05e90
Showing with 2 additions and 9 deletions.
  1. +2 −9 python/plugins/processing/tests/AlgorithmsTestBase.py
@@ -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')

0 comments on commit 3b57b53

Please sign in to comment.