Skip to content

Commit

Permalink
Merge pull request #59696 from rouault/test_qgsproviderconnection_ogr…
Browse files Browse the repository at this point in the history
…_gpkg_precommit_fix

run precommit on test_qgsproviderconnection_ogr_gpkg
  • Loading branch information
rouault authored Dec 2, 2024
2 parents fbd05db + 99a4d34 commit 9c8000e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/src/python/test_qgsproviderconnection_ogr_gpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,17 +493,17 @@ def test_rename_raster_layer(self):

def test_table_layer_with_comment(self):
"""Test a comment layer"""
gpkg_test_comment_layers_path = f'{TEST_DATA_DIR}/test_comment_layers.gpkg'
temp_comment_layers_path = f'{self.temp_dir.path()}/test_comment_layers.gpkg'
gpkg_test_comment_layers_path = f"{TEST_DATA_DIR}/test_comment_layers.gpkg"
temp_comment_layers_path = f"{self.temp_dir.path()}/test_comment_layers.gpkg"
shutil.copy(gpkg_test_comment_layers_path, temp_comment_layers_path)

md = QgsProviderRegistry.instance().providerMetadata(self.providerKey)
conn = md.createConnection(temp_comment_layers_path, {})

tables = conn.tables('', QgsAbstractDatabaseProviderConnection.TableFlag.Vector)
tables = conn.tables("", QgsAbstractDatabaseProviderConnection.TableFlag.Vector)
table_with_comment = tables[0]
self.assertEqual(table_with_comment.tableName(), 'table_with_comment')
self.assertEqual(table_with_comment.comment(), 'table_with_comment')
self.assertEqual(table_with_comment.tableName(), "table_with_comment")
self.assertEqual(table_with_comment.comment(), "table_with_comment")


if __name__ == "__main__":
Expand Down

0 comments on commit 9c8000e

Please sign in to comment.