@pytest.fixture
def fake_window(win_registry, stubs, monkeypatch, qtbot):
 win0 = FakeMainWindow('fake-geometry-0', win_id=0)
 objreg.register('main-window', win0, scope='window', window=0)
 webview = QWebView()
 qtbot.add_widget(webview)
 browser = FakeTabbedBrowser([webview])
 objreg.register('tabbed-browser', browser, scope='window', window=0)
 (yield)
 objreg.delete('main-window', scope='window', window=0)
 objreg.delete('tabbed-browser', scope='window', window=0)

@ pytest . fixture def fake_window ( win_registry , stubs , monkeypatch , qtbot ) : win0 = FakeMainWindow ( 'fake-geometry-0' , win_id = 0 ) objreg . register ( 'main-window' , win0 , scope = 'window' , window = 0 ) webview = QWebView ( ) qtbot . add_widget ( webview ) browser = FakeTabbedBrowser ( [ webview ] ) objreg . register ( 'tabbed-browser' , browser , scope = 'window' , window = 0 ) ( yield ) objreg . delete ( 'main-window' , scope = 'window' , window = 0 ) objreg . delete ( 'tabbed-browser' , scope = 'window' , window = 0 )
fixture which provides a fake main windows with a tabbedbrowser .