Skip to content
Permalink
Browse files

Avoid segfaults in providerconnectionbase test

  • Loading branch information
github-actions authored and nirvn committed Jan 22, 2020
1 parent 767de7c commit f8311be0193ed1be043ffd4ea0710193da712b3e
Showing with 5 additions and 3 deletions.
  1. +5 −3 tests/src/python/test_qgsproviderconnection_base.py
@@ -145,7 +145,8 @@ def _test_operations(self, md, conn):
self.assertEqual(table_property.tableName(), 'myNewTable')
self.assertEqual(table_property.geometryColumnCount(), 1)
self.assertEqual(table_property.geometryColumnTypes()[0].wkbType, QgsWkbTypes.LineString)
self.assertEqual(table_property.geometryColumnTypes()[0].crs, QgsCoordinateReferenceSystem.fromEpsgId(3857))
cols = table_property.geometryColumnTypes()
self.assertEqual(cols[0].crs, QgsCoordinateReferenceSystem.fromEpsgId(3857))
self.assertEqual(table_property.defaultName(), 'myNewTable')

# Check aspatial tables
@@ -158,8 +159,9 @@ def _test_operations(self, md, conn):
self.assertEqual(table_property.geometryColumnCount(), 0)
self.assertEqual(table_property.geometryColumn(), '')
self.assertEqual(table_property.defaultName(), 'myNewAspatialTable')
self.assertEqual(table_property.geometryColumnTypes()[0].wkbType, QgsWkbTypes.NoGeometry)
self.assertFalse(table_property.geometryColumnTypes()[0].crs.isValid())
cols = table_property.geometryColumnTypes()
self.assertEqual(cols[0].wkbType, QgsWkbTypes.NoGeometry)
self.assertFalse(cols[0].crs.isValid())
self.assertFalse(table_property.flags() & QgsAbstractDatabaseProviderConnection.Raster)
self.assertFalse(table_property.flags() & QgsAbstractDatabaseProviderConnection.Vector)
self.assertTrue(table_property.flags() & QgsAbstractDatabaseProviderConnection.Aspatial)

0 comments on commit f8311be

Please sign in to comment.
You can’t perform that action at this time.