Skip to content
Browse files
Test if NULL is selected
cherry-picked from 5b4aed3
  • Loading branch information
signedav committed Oct 30, 2018
1 parent 47243dc commit 278d293fc951e1814d526db75b1f4cb42687a1bc
Showing with 12 additions and 0 deletions.
  1. +12 −0 tests/src/python/
@@ -119,6 +119,18 @@ def testClearToDefault(self):
self.assertEqual(w.text(), 'def')

def test_selectedText(self):
""" test that NULL value is selected on focus and not-null value is not"""
w = qgis.gui.QgsFilterLineEdit(nullValue='my_null_value')
self.assertEqual(w.selectedText(), 'my_null_value')

w.setValue('my new value')
self.assertEqual(w.selectedText(), '')

self.assertEqual(w.selectedText(), 'my_null_value')

@unittest.skipIf(not use_signal_spy, "No QSignalSpy available")
def test_ChangedSignals(self):
""" test that signals are correctly emitted when clearing"""

0 comments on commit 278d293

Please sign in to comment.