Skip to content

Commit

Permalink
Add some more debugging to processing algorithm test
Browse files Browse the repository at this point in the history
Trying to pinpoint which algorithm occasionally segfaults during
test runs
  • Loading branch information
nyalldawson committed Sep 4, 2017
1 parent b9c7b12 commit ddb3198
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/plugins/processing/tests/AlgorithmsTestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def test_algorithms(self):
algorithm_tests = yaml.load(stream)

if 'tests' in algorithm_tests and algorithm_tests['tests'] is not None:
for algtest in algorithm_tests['tests']:
for idx, algtest in enumerate(algorithm_tests['tests']):
print('About to start {} of {}: "{}"'.format(idx, len(algorithm_tests['tests']), algtest['name']))
yield self.check_algorithm, algtest['name'], algtest

def check_algorithm(self, name, defs):
Expand All @@ -102,6 +103,7 @@ def check_algorithm(self, name, defs):
alg = ScriptAlgorithm(filePath)
alg.initAlgorithm()
else:
print('Running alg: "{}"'.format(defs['algorithm']))
alg = QgsApplication.processingRegistry().createAlgorithmById(defs['algorithm'])

parameters = {}
Expand Down

0 comments on commit ddb3198

Please sign in to comment.