Skip to content

Commit

Permalink
Try without subfunction
Browse files Browse the repository at this point in the history
  • Loading branch information
Médéric Ribreux authored and Médéric RIBREUX committed May 29, 2016
1 parent cd7047c commit 03a8a8e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions python/plugins/processing/tests/AlgorithmsTestBase.py
Expand Up @@ -102,20 +102,17 @@ def check_algorithm(self, name, defs):
exec('\n'.join(defs['expectedFailure'][:-1]), globals(), locals())
expectFailure = eval(defs['expectedFailure'][-1])

def doCheck():
alg.execute()

self.check_results(alg.getOutputValuesAsDictionary(), defs['results'])

if expectFailure:
try:
doCheck()
alg.execute()
self.check_results(alg.getOutputValuesAsDictionary(), defs['results'])
except Exception:
pass
else:
raise _UnexpectedSuccess
else:
doCheck()
alg.execute()
self.check_results(alg.getOutputValuesAsDictionary(), defs['results'])

def load_params(self, params):
"""
Expand Down

0 comments on commit 03a8a8e

Please sign in to comment.