def test_unset_text(qtbot):
 label = TextBase()
 qtbot.add_widget(label)
 label.setText('foo')
 label.setText('')
 assert (not label._elided_text)

def test_unset_text ( qtbot ) : label = TextBase ( ) qtbot . add_widget ( label ) label . setText ( 'foo' ) label . setText ( '' ) assert ( not label . _elided_text )
make sure the text is cleared properly .