Skip to content

Commit 7e749a5

Browse files
committed
Fix failing tests
1 parent 78b05c1 commit 7e749a5

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

src/core/qgsunittypes.cpp

100755100644
File mode changed.

src/gui/qgssymbolbutton.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ void QgsSymbolButton::setSymbolType( QgsSymbol::SymbolType type )
6969
case QgsSymbol::Fill:
7070
mSymbol.reset( QgsFillSymbol::createSimple( QgsStringMap() ) );
7171
break;
72+
73+
case QgsSymbol::Hybrid:
74+
break;
7275
}
7376
}
7477
updatePreview();

src/gui/qgsunitselectionwidget.cpp

100755100644
File mode changed.

tests/src/python/test_qgssymbolbutton.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def testGettersSetters(self):
3939
button.setSymbolType(QgsSymbol.Line)
4040
self.assertEqual(button.symbolType(), QgsSymbol.Line)
4141

42-
def testSettingSymbolType(self)
42+
def testSettingSymbolType(self):
4343
button = QgsSymbolButton()
4444
button.setSymbolType(QgsSymbol.Marker)
4545
symbol = QgsMarkerSymbol.createSimple({})
@@ -74,7 +74,7 @@ def testPasteSymbol(self):
7474
# try pasting incompatible symbol
7575
button2.setSymbolType(QgsSymbol.Fill)
7676
fill_symbol = QgsFillSymbol.createSimple({})
77-
fill_symbol.setColor(QColor(0,0,255))
77+
fill_symbol.setColor(QColor(0, 0, 255))
7878
button2.setSymbol(fill_symbol)
7979
button.copySymbol() # copied a marker symbol
8080
button2.pasteSymbol() # should have no effect

tests/src/python/test_qgssymbollayerutils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import qgis # NOQA
1616

1717
from qgis.core import QgsSymbolLayerUtils, QgsMarkerSymbol
18+
from qgis.PyQt.QtGui import QColor
1819
from qgis.PyQt.QtCore import QSizeF, QPointF
1920
from qgis.testing import unittest
2021

0 commit comments

Comments
 (0)