14 changes: 8 additions & 6 deletions tests/src/python/test_qgsatlascomposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def testCase(self):
self.mLabel1 = QgsComposerLabel( self.mComposition )
self.mComposition.addComposerLabel( self.mLabel1 )
self.mLabel1.setText( "[% \"NAME_1\" %] area" )
self.mLabel1.setFont( QgsFontUtils.getStandardTestFont() )
self.mLabel1.adjustSizeToText()
self.mLabel1.setSceneRect( QRectF( 150, 5, 60, 15 ) )

Expand All @@ -91,6 +92,7 @@ def testCase(self):
self.mLabel2 = QgsComposerLabel( self.mComposition )
self.mComposition.addComposerLabel( self.mLabel2 )
self.mLabel2.setText( "# [%$feature || ' / ' || $numfeatures%]" )
self.mLabel2.setFont( QgsFontUtils.getStandardTestFont() )
self.mLabel2.adjustSizeToText()
self.mLabel2.setSceneRect( QRectF( 150, 200, 60, 15 ) )

Expand Down Expand Up @@ -124,7 +126,7 @@ def autoscale_render_test( self ):
self.mLabel1.adjustSizeToText()

checker = QgsCompositionChecker('atlas_autoscale%d' % (i + 1), self.mComposition)
myTestResult, myMessage = checker.testComposition(0, 10)
myTestResult, myMessage = checker.testComposition(0, 200)

assert myTestResult == True
self.mAtlas.endRender()
Expand All @@ -145,7 +147,7 @@ def autoscale_render_test_old_api( self ):
self.mLabel1.adjustSizeToText()

checker = QgsCompositionChecker('atlas_autoscale_old_api%d' % (i + 1), self.mComposition)
myTestResult, myMessage = checker.testComposition()
myTestResult, myMessage = checker.testComposition(0, 200)

assert myTestResult == True
self.mAtlas.endRender()
Expand All @@ -166,7 +168,7 @@ def fixedscale_render_test( self ):
self.mLabel1.adjustSizeToText()

checker = QgsCompositionChecker('atlas_fixedscale%d' % (i + 1), self.mComposition)
myTestResult, myMessage = checker.testComposition()
myTestResult, myMessage = checker.testComposition(0, 200)

assert myTestResult == True
self.mAtlas.endRender()
Expand All @@ -183,7 +185,7 @@ def hidden_render_test( self ):
self.mLabel1.adjustSizeToText()

checker = QgsCompositionChecker('atlas_hiding%d' % (i + 1), self.mComposition)
myTestResult, myMessage = checker.testComposition()
myTestResult, myMessage = checker.testComposition(0, 200)

assert myTestResult == True
self.mAtlas.endRender()
Expand All @@ -204,7 +206,7 @@ def sorting_render_test( self ):
self.mLabel1.adjustSizeToText()

checker = QgsCompositionChecker('atlas_sorting%d' % (i + 1), self.mComposition)
myTestResult, myMessage = checker.testComposition()
myTestResult, myMessage = checker.testComposition(0, 200)

assert myTestResult == True
self.mAtlas.endRender()
Expand All @@ -226,7 +228,7 @@ def filtering_render_test( self ):
self.mLabel1.adjustSizeToText()

checker = QgsCompositionChecker('atlas_filtering%d' % (i + 1), self.mComposition)
myTestResult, myMessage = checker.testComposition()
myTestResult, myMessage = checker.testComposition(0, 200)

assert myTestResult == True
self.mAtlas.endRender()
Expand Down
5 changes: 3 additions & 2 deletions tests/src/python/test_qgscomposermap.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
QgsComposition,
QgsMapRenderer,
QgsMapLayerRegistry,
QgsMultiBandColorRenderer
QgsMultiBandColorRenderer,
QgsFontUtils
)
from utilities import (unitTestDataPath,
getQgisTestApp,
Expand Down Expand Up @@ -78,6 +79,7 @@ def testGrid(self):
self.mComposerMap.setShowGridAnnotation(True)
self.mComposerMap.setGridPenWidth(0.5)
self.mComposerMap.setGridPenColor(QColor(0,255,0))
self.mComposerMap.setGridAnnotationFont( QgsFontUtils.getStandardTestFont() )
self.mComposerMap.setGridAnnotationPrecision(0)
self.mComposerMap.setGridAnnotationPosition(QgsComposerMap.Disabled,
QgsComposerMap.Left)
Expand All @@ -95,7 +97,6 @@ def testGrid(self):
QgsComposerMap.Bottom)
self.mComposerMap.setAnnotationFontColor(QColor(255,0,0,150))
self.mComposerMap.setGridBlendMode(QPainter.CompositionMode_Overlay)
self.mComposerMap.setShowGridAnnotation(False)
checker = QgsCompositionChecker('composermap_grid', self.mComposition)
myTestResult, myMessage = checker.testComposition()
self.mComposerMap.setGridEnabled(False)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.