Skip to content
Permalink
Browse files
Update test, don't assume that SVG fills have a subsymbol by default
  • Loading branch information
nyalldawson committed Oct 23, 2021
1 parent ec41cb5 commit 961d0b3a1a8265a3dae13e1e96efdd92997506f2
Showing with 4 additions and 1 deletion.
  1. +4 −1 tests/src/python/test_qgssymbollayer_createsld.py
@@ -30,7 +30,8 @@
QgsFontMarkerSymbolLayer, QgsEllipseSymbolLayer, QgsSimpleLineSymbolLayer,
QgsMarkerLineSymbolLayer, QgsMarkerSymbol, QgsSimpleFillSymbolLayer, QgsSVGFillSymbolLayer,
QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsVectorLayer, QgsVectorLayerSimpleLabeling,
QgsTextBufferSettings, QgsPalLayerSettings, QgsTextBackgroundSettings, QgsRuleBasedLabeling)
QgsTextBufferSettings, QgsPalLayerSettings, QgsTextBackgroundSettings, QgsRuleBasedLabeling,
QgsLineSymbol)
from qgis.testing import start_app, unittest
from utilities import unitTestDataPath

@@ -293,6 +294,7 @@ def testSvgFillDefault(self):
symbol.setSvgFillColor(QColor('blue'))
symbol.setSvgStrokeWidth(3)
symbol.setSvgStrokeColor(QColor('yellow'))
symbol.setSubSymbol(QgsLineSymbol())
symbol.subSymbol().setWidth(10)

dom, root = self.symbolToSld(symbol)
@@ -313,6 +315,7 @@ def testSvgFillDefault(self):

def testSvgFillPixel(self):
symbol = QgsSVGFillSymbolLayer('test/star.svg', 10, 45)
symbol.setSubSymbol(QgsLineSymbol())
symbol.setSvgFillColor(QColor('blue'))
symbol.setSvgStrokeWidth(3)
symbol.setSvgStrokeColor(QColor('black'))

0 comments on commit 961d0b3

Please sign in to comment.