Skip to content
Permalink
Browse files

Add tests for useContinuousLegend flag

  • Loading branch information
elpaso committed Mar 12, 2021
1 parent b269b50 commit d6047d369ebd292d5a19687d83633087ae8c7934
Showing with 5 additions and 0 deletions.
  1. +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')

0 comments on commit d6047d3

Please sign in to comment.