Skip to content
Permalink
Browse files
Make spatialite-based providers check conditional
  • Loading branch information
nirvn authored and github-actions committed Nov 23, 2021
1 parent 9bc3432 commit 274798360c2fc5b91fcf1533a647c4e92630e46e
Showing with 7 additions and 6 deletions.
  1. +1 −1 tests/src/python/CMakeLists.txt
  2. +6 −5 tests/src/python/test_qgsproviderguiregistry.py
@@ -386,7 +386,7 @@ if (NOT WIN32)
endif()

if (WITH_GUI)
ADD_PYTHON_TEST(PyQgsProviderGuiRegistry test_qgsproviderguiregistry.py)
ADD_PYTHON_TEST(PyQgsProviderGuiRegistry test_qgsproviderguiregistry.py WITH_SPATIALITE=${WITH_SPATIALITE})
endif()

if (WITH_DESKTOP)
@@ -10,6 +10,7 @@
__date__ = '23/11/2021'
__copyright__ = 'Copyright 2021, The QGIS Project'

import sys
import qgis # NOQA

from qgis.gui import (
@@ -30,7 +31,6 @@ def testProviderList(self):
"""
Test provider list
"""

providers = QgsGui.providerGuiRegistry().providerList()
self.assertIn('ogr', providers)
self.assertIn('gdal', providers)
@@ -39,10 +39,11 @@ def testProviderList(self):
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 'WITH_SPATIALITE=TRUE' in sys.argv:
self.assertIn('spatialite', providers)
self.assertIn('WFS', providers)
self.assertIn('virtual', providers)


if __name__ == '__main__':
unittest.main()
unittest.main(argv=['WITH_SPATIALITE'], exit=False)

0 comments on commit 2747983

Please sign in to comment.