Skip to content

Commit

Permalink
Update test, don't assume that SVG fills have a subsymbol by default
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 23, 2021
1 parent ec41cb5 commit 961d0b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/src/python/test_qgssymbollayer_createsld.py
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand All @@ -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'))
Expand Down

0 comments on commit 961d0b3

Please sign in to comment.