Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix failing tests
  • Loading branch information
nyalldawson committed May 2, 2017
1 parent 348c886 commit f81971d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/plugins/processing/tools/vector.py
Expand Up @@ -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):])
Expand Down Expand Up @@ -515,7 +515,7 @@ def _runSQL(sql):

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:
Expand Down Expand Up @@ -545,7 +545,7 @@ def _runSQL(sql):

layer = QgsVectorLayer(uri.uri(), uri.table(), "spatialite")
sink = layer.dataProvider()
context.temporaryLayerStore().addMapLayer(layer, False)
context.temporaryLayerStore().addMapLayer(layer)
else:
formats = QgsVectorFileWriter.supportedFiltersAndFormats()
OGRCodes = {}
Expand Down
1 change: 1 addition & 0 deletions tests/src/python/test_qgsproject.py
Expand Up @@ -684,5 +684,6 @@ def testTakeLayer(self):
p = None
self.assertTrue(l1.isValid())


if __name__ == '__main__':
unittest.main()

0 comments on commit f81971d

Please sign in to comment.