Skip to content

Commit

Permalink
Skip ept specific tests if ept provider is not built
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 6, 2020
1 parent 611fca9 commit fd9abf8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/src/python/test_qgsproviderregistry.py
Expand Up @@ -61,7 +61,8 @@ def testCreateProvider(self):


self.assertIsNone(QgsProviderRegistry.instance().createProvider('asdasdasdasdasd', '')) self.assertIsNone(QgsProviderRegistry.instance().createProvider('asdasdasdasdasd', ''))


def testShouldDeferUriForOtherProviders(self): @unittest.skipIf('ept' not in QgsProviderRegistry.instance().providerList(), 'EPT provider not available')
def testShouldDeferUriForOtherProvidersEpt(self):
self.assertTrue(QgsProviderRegistry.instance().shouldDeferUriForOtherProviders('/home/nyall/ept.json', 'ogr')) self.assertTrue(QgsProviderRegistry.instance().shouldDeferUriForOtherProviders('/home/nyall/ept.json', 'ogr'))
self.assertFalse(QgsProviderRegistry.instance().shouldDeferUriForOtherProviders('/home/nyall/ept.json', 'ept')) self.assertFalse(QgsProviderRegistry.instance().shouldDeferUriForOtherProviders('/home/nyall/ept.json', 'ept'))
self.assertFalse(QgsProviderRegistry.instance().shouldDeferUriForOtherProviders('/home/nyall/my.json', 'ogr')) self.assertFalse(QgsProviderRegistry.instance().shouldDeferUriForOtherProviders('/home/nyall/my.json', 'ogr'))
Expand All @@ -79,6 +80,7 @@ def testUriIsBlocklisted(self):
self.assertTrue(QgsProviderRegistry.instance().uriIsBlocklisted('/home/nyall/me.png.aux.xml')) self.assertTrue(QgsProviderRegistry.instance().uriIsBlocklisted('/home/nyall/me.png.aux.xml'))
self.assertTrue(QgsProviderRegistry.instance().uriIsBlocklisted('/home/nyall/me.tif.xml')) self.assertTrue(QgsProviderRegistry.instance().uriIsBlocklisted('/home/nyall/me.tif.xml'))


@unittest.skipIf('ept' not in QgsProviderRegistry.instance().providerList(), 'EPT provider not available')
def testFilePointCloudFilters(self): def testFilePointCloudFilters(self):
parts = QgsProviderRegistry.instance().filePointCloudFilters().split(';;') parts = QgsProviderRegistry.instance().filePointCloudFilters().split(';;')
self.assertTrue(parts[0].startswith('All Supported Files (')) self.assertTrue(parts[0].startswith('All Supported Files ('))
Expand Down

0 comments on commit fd9abf8

Please sign in to comment.