Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 5, 2020
1 parent 42885bf commit fcdf1f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/plugins/processing/algs/gdal/Datasources2Vrt.py
Expand Up @@ -121,3 +121,6 @@ def processAlgorithm(self, parameters, context, feedback):
f.write(vrt)

return {self.OUTPUT: vrtPath, self.VRT_STRING: vrt}

def commandName(self):
return ''
5 changes: 5 additions & 0 deletions python/plugins/processing/tests/GdalAlgorithmsGeneralTest.py
Expand Up @@ -67,12 +67,17 @@ def testCommandName(self):
# Test that algorithms report a valid commandName
p = QgsApplication.processingRegistry().providerById('gdal')
for a in p.algorithms():
if a.id() in ('gdal:buildvirtualvector'):
# build virtual vector is an exception
continue
self.assertTrue(a.commandName(), 'Algorithm {} has no commandName!'.format(a.id()))

def testCommandNameInTags(self):
# Test that algorithms commandName is present in provided tags
p = QgsApplication.processingRegistry().providerById('gdal')
for a in p.algorithms():
if not a.commandName():
continue
self.assertTrue(a.commandName() in a.tags(), 'Algorithm {} commandName not found in tags!'.format(a.id()))

def testNoParameters(self):
Expand Down

0 comments on commit fcdf1f6

Please sign in to comment.