mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Add ugly debug prints to try to find what is travis-ci problem...
This commit is contained in:
parent
bc4b3a20a7
commit
8884cd715a
@ -83,7 +83,8 @@ class AlgorithmsTest:
|
||||
: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 @@ class AlgorithmsTest:
|
||||
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 @@ class AlgorithmsTest:
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user