Skip to content

Commit f81971d

Browse files
committed
Fix failing tests
1 parent 348c886 commit f81971d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

python/plugins/processing/tools/vector.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ def createVectorWriter(destination, encoding, fields, geometryType, crs, context
478478

479479
layer = QgsVectorLayer(uri, destination, 'memory')
480480
sink = layer.dataProvider()
481-
context.temporaryLayerStore().addMapLayer(layer, False)
481+
context.temporaryLayerStore().addMapLayer(layer)
482482
destination = layer.id()
483483
elif destination.startswith(POSTGIS_LAYER_PREFIX):
484484
uri = QgsDataSourceUri(destination[len(POSTGIS_LAYER_PREFIX):])
@@ -515,7 +515,7 @@ def _runSQL(sql):
515515

516516
layer = QgsVectorLayer(uri.uri(), uri.table(), "postgres")
517517
sink = layer.dataProvider()
518-
context.temporaryLayerStore().addMapLayer(layer, False)
518+
context.temporaryLayerStore().addMapLayer(layer)
519519
elif destination.startswith(SPATIALITE_LAYER_PREFIX):
520520
uri = QgsDataSourceUri(destination[len(SPATIALITE_LAYER_PREFIX):])
521521
try:
@@ -545,7 +545,7 @@ def _runSQL(sql):
545545

546546
layer = QgsVectorLayer(uri.uri(), uri.table(), "spatialite")
547547
sink = layer.dataProvider()
548-
context.temporaryLayerStore().addMapLayer(layer, False)
548+
context.temporaryLayerStore().addMapLayer(layer)
549549
else:
550550
formats = QgsVectorFileWriter.supportedFiltersAndFormats()
551551
OGRCodes = {}

tests/src/python/test_qgsproject.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,5 +684,6 @@ def testTakeLayer(self):
684684
p = None
685685
self.assertTrue(l1.isValid())
686686

687+
687688
if __name__ == '__main__':
688689
unittest.main()

0 commit comments

Comments
 (0)