Skip to content
Permalink
Browse files

Fix partial labels unit tests and generate new control images

  • Loading branch information
dakcarto committed Feb 21, 2014
1 parent 1d91641 commit 10f2ac92ac8882a50f0a0afa2851cbba56c12771
@@ -19,17 +19,21 @@
from PyQt4.QtCore import *
from PyQt4.QtGui import *

from qgis.core import (
QgsPalLayerSettings,
)
from qgis.core import *


class TestPointBase(object):

def __init__(self):
"""Dummy assignments, intended to be overriden in subclasses"""
self.lyr = QgsPalLayerSettings()
""":type: QgsPalLayerSettings"""
self._TestFont = QApplication.font() # will become a standard test font
self.params = dict()
self._Pal = None
""":type: QgsPalLabeling"""
self._Canvas = None
""":type: QgsMapCanvas"""

def checkTest(self, **kwargs):
"""Intended to be overriden in subclasses"""
@@ -55,20 +59,22 @@ def test_text_color(self):
def test_partials_labels_enabled(self):
# Set Big font size
font = QFont(self._TestFont)
font.setPointSizeF(90)
font.setPointSizeF(120)
self.lyr.textFont = font
# Enable partials labels
self._PalEngine.setShowingPartialsLabels(True)
self._Pal.setShowingPartialsLabels(True)
self._Pal.saveEngineSettings()
# Check
self.checkTest()

def test_partials_labels_disabled(self):
# Set Big font size
font = QFont(self._TestFont)
font.setPointSizeF(90)
font.setPointSizeF(120)
self.lyr.textFont = font
# Disable partials labels
self._PalEngine.setShowingPartialsLabels(False)
self._Pal.setShowingPartialsLabels(False)
self._Pal.saveEngineSettings()
# Check
self.checkTest()

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

0 comments on commit 10f2ac9

Please sign in to comment.
You can’t perform that action at this time.