Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 31, 2023
1 parent 2b29758 commit 12c8c9a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/src/python/test_qgspallabeling_placement.py
Expand Up @@ -19,6 +19,7 @@
import qgis # NOQA
from qgis.PyQt.QtCore import qDebug
from qgis.core import (
Qgis,
QgsLabeling,
QgsLabelingEngineSettings,
QgsLabelObstacleSettings,
Expand Down Expand Up @@ -838,7 +839,7 @@ def test_small_polygon_large_label_allow_outside(self):
self.layer = TestQgsPalLabeling.loadFeatureLayer('polygon_small')
self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
self.lyr.placement = QgsPalLayerSettings.OverPoint
self.lyr.setPolygonPlacementFlags(QgsLabeling.AllowPlacementOutsideOfPolygon | QgsLabeling.AllowPlacementInsideOfPolygon)
self.lyr.setPolygonPlacementFlags(Qgis.LabelPolygonPlacementFlags(QgsLabeling.AllowPlacementOutsideOfPolygon | QgsLabeling.AllowPlacementInsideOfPolygon))
self.checkTest()
self.removeMapLayer(self.layer)
self.layer = None
Expand All @@ -849,7 +850,7 @@ def test_small_polygon_small_label_inside_and_outside(self):
self.layer = TestQgsPalLabeling.loadFeatureLayer('polygon_small')
self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
self.lyr.placement = QgsPalLayerSettings.OverPoint
self.lyr.setPolygonPlacementFlags(QgsLabeling.AllowPlacementOutsideOfPolygon | QgsLabeling.AllowPlacementInsideOfPolygon)
self.lyr.setPolygonPlacementFlags(Qgis.LabelPolygonPlacementFlags(QgsLabeling.AllowPlacementOutsideOfPolygon | QgsLabeling.AllowPlacementInsideOfPolygon))
f = self.lyr.format()
f.setSize(8)
self.lyr.setFormat(f)
Expand All @@ -863,7 +864,7 @@ def test_small_polygon_small_label_outside_only(self):
self.layer = TestQgsPalLabeling.loadFeatureLayer('polygon_small')
self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
self.lyr.placement = QgsPalLayerSettings.OverPoint
self.lyr.setPolygonPlacementFlags(QgsLabeling.AllowPlacementOutsideOfPolygon)
self.lyr.setPolygonPlacementFlags(Qgis.LabelPolygonPlacementFlags(QgsLabeling.AllowPlacementOutsideOfPolygon))
f = self.lyr.format()
f.setSize(8)
self.lyr.setFormat(f)
Expand Down

0 comments on commit 12c8c9a

Please sign in to comment.