Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Dec 23, 2012
1 parent 5e45a22 commit 5c64c10
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/src/python/test_qgsatlascomposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def testCase(self):
vectorFileInfo = QFileInfo( self.TEST_DATA_DIR + QDir().separator().toAscii() + "france_parts.shp")
mVectorLayer = QgsVectorLayer( vectorFileInfo.filePath(), vectorFileInfo.completeBaseName(), "ogr" )

QgsMapLayerRegistry.instance().addMapLayer( mVectorLayer )
QgsMapLayerRegistry.instance().addMapLayers( [mVectorLayer] )

# create composition with composer map
mMapRenderer = QgsMapRenderer()
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgscomposerlabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def testCase(self):
vectorFileInfo = QFileInfo( TEST_DATA_DIR + QDir().separator().toAscii() + "france_parts.shp")
mVectorLayer = QgsVectorLayer( vectorFileInfo.filePath(), vectorFileInfo.completeBaseName(), "ogr" )

QgsMapLayerRegistry.instance().addMapLayer( mVectorLayer )
QgsMapLayerRegistry.instance().addMapLayers( [mVectorLayer] )

# create composition with composer map
mMapRenderer = QgsMapRenderer()
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgscomposermap.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __init__(self, methodName):
mRasterLayer.setRenderer(rasterRenderer)
#pipe = mRasterLayer.pipe()
#assert pipe.set(rasterRenderer), 'Cannot set pipe renderer'
QgsMapLayerRegistry.instance().addMapLayer(mRasterLayer)
QgsMapLayerRegistry.instance().addMapLayers([mRasterLayer])

# create composition with composer map
self.mMapRenderer = QgsMapRenderer()
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgscomposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def testPrintMapFromTemplate(self):
myPipe = myRasterLayer.pipe()
assert myPipe.set( myRenderer ), "Cannot set pipe renderer"

QgsMapLayerRegistry.instance().addMapLayer(myRasterLayer)
QgsMapLayerRegistry.instance().addMapLayers([myRasterLayer])

myMapRenderer = QgsMapRenderer()
myLayerStringList = QStringList()
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5c64c10

Please sign in to comment.