Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add tests for useContinuousLegend flag
- Loading branch information
Showing
with
5 additions
and
0 deletions.
-
+5
−0
tests/src/python/test_qgscolorramplegendnode.py
|
@@ -77,6 +77,10 @@ def test_settings(self): |
|
|
self.assertEqual(settings.orientation(), Qt.Vertical) |
|
|
settings.setOrientation(Qt.Horizontal) |
|
|
self.assertEqual(settings.orientation(), Qt.Horizontal) |
|
|
# Test default |
|
|
self.assertTrue(settings.useContinuousLegend()) |
|
|
settings.setUseContinuousLegend(False) |
|
|
self.assertFalse(settings.useContinuousLegend()) |
|
|
|
|
|
self.assertFalse(settings.textFormat().isValid()) |
|
|
tf = QgsTextFormat() |
|
@@ -116,6 +120,7 @@ def test_settings(self): |
|
|
self.assertEqual(settings3.suffix(), 'suff') |
|
|
self.assertEqual(settings3.textFormat().size(), 13) |
|
|
self.assertEqual(settings3.orientation(), Qt.Horizontal) |
|
|
self.assertFalse(settings3.useContinuousLegend()) |
|
|
|
|
|
# no text format |
|
|
elem = doc.createElement('test2') |
|
|