Skip to content

Commit

Permalink
Rebuild labeling tests control images with smaller size (420 x 280)
Browse files Browse the repository at this point in the history
  • Loading branch information
dakcarto committed Mar 25, 2014
1 parent 90f012d commit db4401f
Show file tree
Hide file tree
Showing 40 changed files with 7 additions and 11 deletions.
4 changes: 2 additions & 2 deletions tests/src/python/test_qgspallabeling_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def getBaseMapSettings(cls):
# default for labeling test data: WGS 84 / UTM zone 13N
crs.createFromSrid(32613)
ms.setBackgroundColor(QColor(152, 219, 249))
ms.setOutputSize(QSize(600, 400))
ms.setOutputSize(QSize(420, 280))
ms.setOutputDpi(72)
ms.setFlag(QgsMapSettings.Antialiasing)
ms.setDestinationCrs(crs)
Expand Down Expand Up @@ -258,7 +258,7 @@ def defaultLayerSettings(self):
lyr.enabled = True
lyr.fieldName = 'text' # default in test data sources
font = self.getTestFont()
font.setPointSize(48)
font.setPointSize(32)
lyr.textFont = font
lyr.textNamedStyle = 'Roman'
return lyr
Expand Down
3 changes: 2 additions & 1 deletion tests/src/python/test_qgspallabeling_composer.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def checkTest(self, **kwargs):
mismatch = 0
if 'PAL_NO_MISMATCH' not in os.environ:
# some mismatch expected
mismatch = self._Mismatch if self._Mismatch else 200
mismatch = self._Mismatch if self._Mismatch else 20
if self._TestGroup in self._Mismatches:
mismatch = self._Mismatches[self._TestGroup]
colortol = 0
Expand Down Expand Up @@ -320,6 +320,7 @@ def setUp(self):
super(TestComposerSvgVsComposerPoint, self).setUp()
self._TestKind = OutputKind.Svg
self.configTest('pal_composer', 'sp_img')
self._Mismatch = 350


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgspallabeling_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def checkTest(self, **kwargs):
mismatch = 0
if 'PAL_NO_MISMATCH' not in os.environ:
# some mismatch expected
mismatch = self._Mismatch if self._Mismatch else 50
mismatch = self._Mismatch if self._Mismatch else 20
if self._TestGroup in self._Mismatches:
mismatch = self._Mismatches[self._TestGroup]
colortol = 0
Expand Down
9 changes: 2 additions & 7 deletions tests/src/python/test_qgspallabeling_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def checkTest(self, **kwargs):

def test_default_label(self):
# Default label placement, with text size in points
self._Mismatches['TestComposerSvgVsComposerPoint'] = 500
self.checkTest()

def test_text_size_map_unit(self):
Expand All @@ -70,12 +69,10 @@ def test_text_size_map_unit(self):
def test_text_color(self):
# Label color change
self.lyr.textColor = Qt.blue
self._Mismatches['TestComposerSvgVsComposerPoint'] = 500
self.checkTest()

def test_background_rect(self):
self.lyr.shapeDraw = True
self._Mismatches['TestComposerSvgVsComposerPoint'] = 1100
self.checkTest()

def test_background_rect_w_offset(self):
Expand All @@ -91,7 +88,6 @@ def test_background_rect_w_offset(self):
self.lyr.shapeDraw = True
self.lyr.shapeOffsetUnits = QgsPalLayerSettings.MapUnits
self.lyr.shapeOffset = QPointF(-2900.0, -450.0)
self._Mismatches['TestComposerSvgVsComposerPoint'] = 750
self.checkTest()

def test_background_svg(self):
Expand Down Expand Up @@ -134,18 +130,17 @@ def test_background_svg_w_offset(self):
def test_partials_labels_enabled(self):
# Set Big font size
font = QFont(self._TestFont)
font.setPointSizeF(120)
font.setPointSizeF(84)
self.lyr.textFont = font
# Enable partials labels
self._Pal.setShowingPartialsLabels(True)
self._Pal.saveEngineSettings()
self._Mismatches['TestComposerSvgVsComposerPoint'] = 600
self.checkTest()

def test_partials_labels_disabled(self):
# Set Big font size
font = QFont(self._TestFont)
font.setPointSizeF(120)
font.setPointSizeF(84)
self.lyr.textFont = font
# Disable partials labels
self._Pal.setShowingPartialsLabels(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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 db4401f

Please sign in to comment.