Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 3, 2019
1 parent 9f63f49 commit 316fd50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/src/core/testqgsmaprendererjob.cpp
Expand Up @@ -767,6 +767,7 @@ void TestQgsMapRendererJob::stagedRendererWithStagedLabeling()
settings.fieldName = QStringLiteral( "Name" );
settings.placement = QgsPalLayerSettings::OverPoint;
settings.zIndex = 2;
settings.obstacleSettings().setType( QgsLabelObstacleSettings::PolygonInterior );
polygonsLayer->setLabeling( new QgsVectorLayerSimpleLabeling( settings ) );
polygonsLayer->setLabelsEnabled( true );

Expand Down
2 changes: 2 additions & 0 deletions tests/src/python/test_qgspallabeling_placement.py
Expand Up @@ -622,6 +622,7 @@ def test_polygon_polygon_obstacle_obstacle_factor_greater_equal(self):
obstacle_label_settings.obstacle = True
obstacle_label_settings.drawLabels = False
obstacle_label_settings.obstacleFactor = obstacle_weight * 0.2
obstacle_label_settings.obstacleSettings().setType(QgsLabelObstacleSettings.PolygonInterior)
obstacleLayer.setLabeling(QgsVectorLayerSimpleLabeling(obstacle_label_settings))
obstacleLayer.setLabelsEnabled(True)

Expand All @@ -645,6 +646,7 @@ def test_polygon_polygon_obstacle_obstacle_factor_less(self):
obstacle_label_settings.obstacle = True
obstacle_label_settings.drawLabels = False
obstacle_label_settings.obstacleFactor = obstacle_weight * 0.2
obstacle_label_settings.obstacleSettings().setType(QgsLabelObstacleSettings.PolygonInterior)
obstacleLayer.setLabeling(QgsVectorLayerSimpleLabeling(obstacle_label_settings))
obstacleLayer.setLabelsEnabled(True)

Expand Down

0 comments on commit 316fd50

Please sign in to comment.