GispoCoding/cookiecutter-qgis-plugin

Examples of how to test processing algorithm

Opened this issue · 0 comments

Expected behaviour
It would be nice if there was an example of how to test a processing algorithm in the tests folder. I'm struggling with how to do it - it seems as though the provider created in the template is not loaded in the testing environment.

Current behaviour
Currently I have tried this but it's failing. It seems that the provider isn't loaded.

def test_processing_providers(qgis_app, qgis_processing):
    assert "my-plugin-provider" in [provider.id() for provider in qgis_app.processingRegistry().providers()]