Skip to content

Commit

Permalink
Fix some deprecation warnings in test
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 3, 2021
1 parent 3e3f169 commit 6cdbc6a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/src/python/test_provider_ogr_gpkg.py
Expand Up @@ -828,11 +828,11 @@ def testExportLayerToExistingDatabase(self):
options['driverName'] = 'GPKG'
options['layerName'] = 'table1'
exporter = QgsVectorLayerExporter(tmpfile, "ogr", fields, QgsWkbTypes.Polygon,
QgsCoordinateReferenceSystem(3111), False, options)
QgsCoordinateReferenceSystem('EPSG:3111'), False, options)
self.assertFalse(exporter.errorCode(),
'unexpected export error {}: {}'.format(exporter.errorCode(), exporter.errorMessage()))
options['layerName'] = 'table2'
exporter = QgsVectorLayerExporter(tmpfile, "ogr", fields, QgsWkbTypes.Point, QgsCoordinateReferenceSystem(3113),
exporter = QgsVectorLayerExporter(tmpfile, "ogr", fields, QgsWkbTypes.Point, QgsCoordinateReferenceSystem('EPSG:3113'),
False, options)
self.assertFalse(exporter.errorCode(),
'unexpected export error {} : {}'.format(exporter.errorCode(), exporter.errorMessage()))
Expand Down Expand Up @@ -1356,7 +1356,7 @@ def testRegenerateFid(self):
options['driverName'] = 'GPKG'
options['layerName'] = 'table1'
exporter = QgsVectorLayerExporter(tmpfile, "ogr", fields, QgsWkbTypes.Polygon,
QgsCoordinateReferenceSystem(3111), False, options,
QgsCoordinateReferenceSystem('EPSG:3111'), False, options,
QgsFeatureSink.RegeneratePrimaryKey)
self.assertFalse(exporter.errorCode(),
'unexpected export error {}: {}'.format(exporter.errorCode(), exporter.errorMessage()))
Expand Down Expand Up @@ -1406,7 +1406,7 @@ def testExportWithoutFids(self):
options['update'] = True
options['driverName'] = 'GPKG'
options['layerName'] = 'output'
exporter = QgsVectorLayerExporter(tmpfile, "ogr", fields, QgsWkbTypes.Point, QgsCoordinateReferenceSystem(4326),
exporter = QgsVectorLayerExporter(tmpfile, "ogr", fields, QgsWkbTypes.Point, QgsCoordinateReferenceSystem('EPSG:4326'),
False, options, QgsFeatureSink.RegeneratePrimaryKey)
self.assertFalse(exporter.errorCode(),
'unexpected export error {}: {}'.format(exporter.errorCode(), exporter.errorMessage()))
Expand Down Expand Up @@ -1996,7 +1996,7 @@ def _testVectorLayerExporterDeferredSpatialIndex(self, layerOptions, expectSpati
if layerOptions:
options['layerOptions'] = layerOptions
exporter = QgsVectorLayerExporter(tmpfile, "ogr", QgsFields(), QgsWkbTypes.Polygon,
QgsCoordinateReferenceSystem(3111), False, options)
QgsCoordinateReferenceSystem('EPSG:3111'), False, options)
self.assertFalse(exporter.errorCode(),
'unexpected export error {}: {}'.format(exporter.errorCode(), exporter.errorMessage()))

Expand Down

0 comments on commit 6cdbc6a

Please sign in to comment.