Skip to content


Test if NULL is selected
Browse files Browse the repository at this point in the history
cherry-picked from 5b4aed3
  • Loading branch information
signedav committed Oct 30, 2018
1 parent 47243dc commit 278d293
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/src/python/
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down

0 comments on commit 278d293

Please sign in to comment.