def test_text_elide_none(mocker, qtbot):
 label = TextBase()
 qtbot.add_widget(label)
 label.setText('')
 mocker.patch('qutebrowser.mainwindow.statusbar.textbase.TextBase.fontMetrics')
 label._update_elided_text(20)
 assert (not label.fontMetrics.called)

def test_text_elide_none ( mocker , qtbot ) : label = TextBase ( ) qtbot . add_widget ( label ) label . setText ( '' ) mocker . patch ( 'qutebrowser.mainwindow.statusbar.textbase.TextBase.fontMetrics' ) label . _update_elided_text ( 20 ) assert ( not label . fontMetrics . called )
make sure the text doesnt get elided if its empty .