Skip to content
Permalink
Browse files

Fix passing geometry compare options to checkLayersEqual

  • Loading branch information
nyalldawson committed Feb 5, 2021
1 parent 3676338 commit af03d1165814c0b2a42a0f69983a61544f6d6986
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 af03d11

Please sign in to comment.