@pytest.fixture
def fake_statusbar(qtbot):
 container = QWidget()
 qtbot.add_widget(container)
 vbox = QVBoxLayout(container)
 vbox.addStretch()
 statusbar = FakeStatusBar(container)
 statusbar.container = container
 vbox.addWidget(statusbar)
 with qtbot.waitExposed(container):
  container.show()
 return statusbar

@ pytest . fixture def fake_statusbar ( qtbot ) : container = QWidget ( ) qtbot . add_widget ( container ) vbox = QVBoxLayout ( container ) vbox . addStretch ( ) statusbar = FakeStatusBar ( container ) statusbar . container = container vbox . addWidget ( statusbar ) with qtbot . waitExposed ( container ) : container . show ( ) return statusbar
fixture providing a statusbar in a container window .