Skip to content
Permalink
Browse files
Better logic for sql layer tests
  • Loading branch information
elpaso committed Jul 9, 2021
1 parent 3cac2e7 commit a94e089490b0db0ecc6906eb9539e88f2c7cfaee
Showing with 4 additions and 7 deletions.
  1. +4 −7 tests/src/python/test_qgsproviderconnection_base.py
@@ -529,22 +529,19 @@ def testCreateSqlVectorLayer(self):
print(f"FIXME: {self.providerKey} data provider does not support query layers!")
return

try:
schema = getattr(self, 'sqlVectorLayerSchema')
except: # noqa: E722
schema = getattr(self, 'sqlVectorLayerSchema', None)
if schema is None:
print(f"FIXME: {self.providerKey} data provider test case does not define self.sqlVectorLayerSchema for query layers test!")
return

try:
table = getattr(self, 'sqlVectorLayerTable')
except: # noqa: E722
table = getattr(self, 'sqlVectorLayerTable', None)
if table is None:
print(f"FIXME: {self.providerKey} data provider test case does not define self.sqlVectorLayerTable for query layers test!")
return

sql_layer_capabilities = conn.sqlLayerDefinitionCapabilities()

# Try a simple select first

table_info = conn.table(schema, table)

options = QgsAbstractDatabaseProviderConnection.SqlVectorLayerOptions()

0 comments on commit a94e089

Please sign in to comment.