mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Fix failing tests
This commit is contained in:
parent
348c886602
commit
f81971daa4
@ -478,7 +478,7 @@ def createVectorWriter(destination, encoding, fields, geometryType, crs, context
|
||||
|
||||
layer = QgsVectorLayer(uri, destination, 'memory')
|
||||
sink = layer.dataProvider()
|
||||
context.temporaryLayerStore().addMapLayer(layer, False)
|
||||
context.temporaryLayerStore().addMapLayer(layer)
|
||||
destination = layer.id()
|
||||
elif destination.startswith(POSTGIS_LAYER_PREFIX):
|
||||
uri = QgsDataSourceUri(destination[len(POSTGIS_LAYER_PREFIX):])
|
||||
@ -515,7 +515,7 @@ def createVectorWriter(destination, encoding, fields, geometryType, crs, context
|
||||
|
||||
layer = QgsVectorLayer(uri.uri(), uri.table(), "postgres")
|
||||
sink = layer.dataProvider()
|
||||
context.temporaryLayerStore().addMapLayer(layer, False)
|
||||
context.temporaryLayerStore().addMapLayer(layer)
|
||||
elif destination.startswith(SPATIALITE_LAYER_PREFIX):
|
||||
uri = QgsDataSourceUri(destination[len(SPATIALITE_LAYER_PREFIX):])
|
||||
try:
|
||||
@ -545,7 +545,7 @@ def createVectorWriter(destination, encoding, fields, geometryType, crs, context
|
||||
|
||||
layer = QgsVectorLayer(uri.uri(), uri.table(), "spatialite")
|
||||
sink = layer.dataProvider()
|
||||
context.temporaryLayerStore().addMapLayer(layer, False)
|
||||
context.temporaryLayerStore().addMapLayer(layer)
|
||||
else:
|
||||
formats = QgsVectorFileWriter.supportedFiltersAndFormats()
|
||||
OGRCodes = {}
|
||||
|
@ -684,5 +684,6 @@ class TestQgsProject(unittest.TestCase):
|
||||
p = None
|
||||
self.assertTrue(l1.isValid())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
Loading…
x
Reference in New Issue
Block a user