-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test to make sure this never regresses again
- Loading branch information
1 parent
a06c2ea
commit 9bc3432
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# -*- coding: utf-8 -*- | ||
"""QGIS Unit tests for QgsProviderGuiRegistry. | ||
.. note:: This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
""" | ||
__author__ = 'Mathieu Pellerin' | ||
__date__ = '23/11/2021' | ||
__copyright__ = 'Copyright 2021, The QGIS Project' | ||
|
||
import qgis # NOQA | ||
|
||
from qgis.gui import ( | ||
QgsGui, | ||
QgsProviderGuiRegistry | ||
) | ||
from qgis.testing import start_app, unittest | ||
from utilities import unitTestDataPath | ||
|
||
# Convenience instances in case you may need them | ||
# to find the srs.db | ||
start_app() | ||
|
||
|
||
class TestQgsProviderGuiRegistry(unittest.TestCase): | ||
|
||
def testProviderList(self): | ||
""" | ||
Test provider list | ||
""" | ||
|
||
providers = QgsGui.providerGuiRegistry().providerList() | ||
self.assertIn('ogr', providers) | ||
self.assertIn('gdal', providers) | ||
self.assertIn('wms', providers) | ||
self.assertIn('wms', providers) | ||
self.assertIn('wcs', providers) | ||
self.assertIn('delimitedtext', providers) | ||
self.assertIn('arcgisfeatureserver', providers) | ||
self.assertIn('spatialite', providers) | ||
self.assertIn('WFS', providers) | ||
self.assertIn('virtual', providers) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |