@pytest.fixture
def progress_widget(qtbot, monkeypatch, config_stub):
 config_stub.data = {'colors': {'statusbar.progress.bg': 'black'}, 'fonts': {}}
 monkeypatch.setattr('qutebrowser.mainwindow.statusbar.progress.style.config', config_stub)
 widget = Progress()
 qtbot.add_widget(widget)
 assert (not widget.isVisible())
 assert (not widget.isTextVisible())
 return widget

@ pytest . fixture def progress_widget ( qtbot , monkeypatch , config_stub ) : config_stub . data = { 'colors' : { 'statusbar.progress.bg' : 'black' } , 'fonts' : { } } monkeypatch . setattr ( 'qutebrowser.mainwindow.statusbar.progress.style.config' , config_stub ) widget = Progress ( ) qtbot . add_widget ( widget ) assert ( not widget . isVisible ( ) ) assert ( not widget . isTextVisible ( ) ) return widget
create a progress widget and checks its initial state .