Skip to content

Commit bd4087b

Browse files
author
Sandro Santilli
committedDec 12, 2014
Tweak tolerances for CanvasPoint and ComposerPdfPoint PAL tests
.. to succeed on Ubuntu 14.04.1 LTS
1 parent 5a25461 commit bd4087b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
 

‎tests/src/python/test_qgspallabeling_tests.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def checkTest(self, **kwargs):
5757

5858
def test_default_label(self):
5959
# Default label placement, with text size in points
60+
self._Mismatches['TestCanvasPoint'] = 776;
61+
self._ColorTols['TestComposerPdfPoint'] = 2;
6062
self.checkTest()
6163

6264
def test_text_size_map_unit(self):
@@ -65,15 +67,21 @@ def test_text_size_map_unit(self):
6567
font = QFont(self._TestFont)
6668
font.setPointSizeF(460)
6769
self.lyr.textFont = font
70+
self._Mismatches['TestCanvasPoint'] = 776;
71+
self._ColorTols['TestComposerPdfPoint'] = 2;
6872
self.checkTest()
6973

7074
def test_text_color(self):
75+
self._Mismatches['TestCanvasPoint'] = 774;
76+
self._ColorTols['TestComposerPdfPoint'] = 2;
7177
# Label color change
7278
self.lyr.textColor = Qt.blue
7379
self.checkTest()
7480

7581
def test_background_rect(self):
7682
self.lyr.shapeDraw = True
83+
self._Mismatches['TestCanvasPoint'] = 776;
84+
self._ColorTols['TestComposerPdfPoint'] = 1;
7785
self.checkTest()
7886

7987
def test_background_rect_w_offset(self):
@@ -89,6 +97,9 @@ def test_background_rect_w_offset(self):
8997
self.lyr.shapeDraw = True
9098
self.lyr.shapeOffsetUnits = QgsPalLayerSettings.MapUnits
9199
self.lyr.shapeOffset = QPointF(-2900.0, -450.0)
100+
101+
self._Mismatches['TestCanvasPoint'] = 774;
102+
self._ColorTols['TestComposerPdfPoint'] = 2;
92103
self.checkTest()
93104

94105
def test_background_svg(self):
@@ -107,6 +118,8 @@ def test_background_svg(self):
107118
self.lyr.shapeSizeType = QgsPalLayerSettings.SizeBuffer
108119
self.lyr.shapeSize = QPointF(100.0, 0.0)
109120
self._Mismatches['TestComposerPdfVsComposerPoint'] = 580
121+
self._Mismatches['TestCanvasPoint'] = 776;
122+
self._ColorTols['TestComposerPdfPoint'] = 2;
110123
self.checkTest()
111124

112125
def test_background_svg_w_offset(self):
@@ -128,6 +141,8 @@ def test_background_svg_w_offset(self):
128141
self.lyr.shapeOffsetUnits = QgsPalLayerSettings.MapUnits
129142
self.lyr.shapeOffset = QPointF(-2850.0, 500.0)
130143
self._Mismatches['TestComposerPdfVsComposerPoint'] = 760
144+
self._Mismatches['TestCanvasPoint'] = 776;
145+
self._ColorTols['TestComposerPdfPoint'] = 2;
131146
self.checkTest()
132147

133148
def test_partials_labels_enabled(self):
@@ -138,6 +153,8 @@ def test_partials_labels_enabled(self):
138153
# Enable partials labels
139154
self._Pal.setShowingPartialsLabels(True)
140155
self._Pal.saveEngineSettings()
156+
self._Mismatches['TestCanvasPoint'] = 779;
157+
self._ColorTols['TestComposerPdfPoint'] = 2;
141158
self.checkTest()
142159

143160
def test_partials_labels_disabled(self):

0 commit comments

Comments
 (0)
Please sign in to comment.