Skip to content
Permalink
Browse files

Add ugly debug prints to try to find what is travis-ci problem...

  • Loading branch information
Médéric Ribreux Médéric RIBREUX
Médéric Ribreux authored and Médéric RIBREUX committed May 23, 2016
1 parent bc4b3a2 commit 8884cd715ac00f6de46bc22087502ab8470d5d72
Showing with 4 additions and 3 deletions.
  1. +4 −3 python/plugins/processing/tests/AlgorithmsTestBase.py
@@ -83,7 +83,8 @@ def check_algorithm(self, name, defs):
:param defs: A python dict containing a test algorithm definition
"""
QgsMapLayerRegistry.instance().removeAllMapLayers()

print('DEBUG on {}'.format(name))
print('Params = {}'.format(defs))
params = self.load_params(defs['params'])
alg = processing.Processing.getAlgorithm(defs['algorithm']).getCopy()

@@ -168,7 +169,6 @@ def load_layer(self, param):
Loads a layer which was specified as parameter.
"""
filepath = self.filepath_from_param(param)

if param['type'] == 'vector':
lyr = QgsVectorLayer(filepath, param['name'], 'ogr')
elif param['type'] == 'raster':
@@ -185,13 +185,14 @@ def filepath_from_param(self, param):
prefix = processingTestDataPath()
if 'location' in param and param['location'] == 'qgs':
prefix = unitTestDataPath()

print('DEBUG filepath_from_param: {} -> {}'.format(param['name'], os.path.join(prefix, param['name'])))
return os.path.join(prefix, param['name'])

def check_results(self, results, expected):
"""
Checks if result produced by an algorithm matches with the expected specification.
"""
print('DEBUG check_results: results {}\n\texpected {}'.format(results, expected))
for id, expected_result in expected.items():
if 'vector' == expected_result['type']:
expected_lyr = self.load_layer(expected_result)

0 comments on commit 8884cd7

Please sign in to comment.
You can’t perform that action at this time.