Skip to content

Commit

Permalink
Add tests for useContinuousLegend flag
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Mar 12, 2021
1 parent b269b50 commit d6047d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/src/python/test_qgscolorramplegendnode.py
Expand Up @@ -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()
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit d6047d3

Please sign in to comment.