Skip to content
Permalink
Browse files
fix tests
  • Loading branch information
alexbruy committed Dec 23, 2012
1 parent 5e45a22 commit 5c64c10284e35feff91967ea1b800fc5d1607913
@@ -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()
@@ -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()
@@ -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()
@@ -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()
Binary file not shown.

0 comments on commit 5c64c10

Please sign in to comment.