diff --git a/tests/conftest.py b/tests/conftest.py index b2f7d5598..ef8077c6e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -96,7 +96,7 @@ def win_registry(): window2 = FakeWindow(registry2) objreg.window_registry[0] = window1 objreg.window_registry[1] = window2 - yield + yield [window1, window2] del objreg.window_registry[1] del objreg.window_registry[0] diff --git a/tests/unit/commands/test_argparser.py b/tests/unit/commands/test_argparser.py index 8e7ce0938..7c33e257a 100644 --- a/tests/unit/commands/test_argparser.py +++ b/tests/unit/commands/test_argparser.py @@ -47,8 +47,10 @@ class TestArgumentParser: @pytest.yield_fixture def tabbed_browser(self, win_registry): tb = FakeTabbedBrowser() + objreg.register('last-focused-main-window', win_registry[0]) objreg.register('tabbed-browser', tb, scope='window', window=0) yield tb + objreg.delete('last-focused-main-window') objreg.delete('tabbed-browser', scope='window', window=0) def test_name(self, parser):