Skip to content

Commit d0d284a

Browse files
committed
Update AlgorithmsTestBase.py
1 parent 781c10b commit d0d284a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

python/plugins/processing/tests/AlgorithmsTestBase.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def check_algorithm(self, name, defs):
8787
for r, p in defs['results'].iteritems():
8888
alg.setOutputValue(r, self.load_result_param(p))
8989

90-
self.assertTrue(AlgorithmExecutor.runalg(alg))
9190
print(alg.getAsCommand())
91+
self.assertTrue(AlgorithmExecutor.runalg(alg))
9292
self.check_results(alg.getOutputValuesAsDictionary(), defs['results'])
9393

9494
def load_params(self, params):
@@ -177,10 +177,7 @@ def check_results(self, results, expected):
177177

178178
result_lyr = QgsVectorLayer(results[id], id, 'ogr')
179179

180-
try:
181-
compare = expected_result['compare']
182-
except KeyError:
183-
compare = {}
180+
compare = expected_result.get('compare', {})
184181

185182
self.assertLayersEqual(expected_lyr, result_lyr, compare=compare)
186183

0 commit comments

Comments
 (0)