Skip to content

Instantly share code, notes, and snippets.

@ghtmtt
Last active December 7, 2017 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghtmtt/1c3cada5d079e22fff29509627c46c76 to your computer and use it in GitHub Desktop.
Save ghtmtt/1c3cada5d079e22fff29509627c46c76 to your computer and use it in GitHub Desktop.
Processing tests missing list
import processing
import yaml
# get QGIS algorithm list by name
qgis_algs = [i.name() for i in QgsApplication.processingRegistry().providerById("qgis").algorithms()]
# get NATIVE algorithm list by name
native_algs = [i.name() for i in QgsApplication.processingRegistry().providerById("native").algorithms()]
# total algorithms of QGIS provider in Processing
total_algs = qgis_algs + native_algs
# catch the done tests from the local file of the repository
done_qgis = []
path = 'https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml'
with open(path) as f:
m_qgis = yaml.safe_load(f)
for k, v in m_qgis.items():
for i in v:
done_qgis.append(i['algorithm'].split(':')[1])
done_qgis = list(set(done_qgis))
done_qgis.sort()
# missing list of tests
missing_qgis = []
for i in total_algs:
if i not in done_qgis:
missing_qgis.append(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment