Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
proneon267 committed Dec 19, 2024
1 parent 42e4516 commit eb19ad9
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions testbed/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,6 @@ async def window_cleanup(app, app_probe, main_window, main_window_probe):
# 2 passes because we can't modify the list while iterating over it.
kill_list = []
for window in app.windows:
# Reset window state to NORMAL, if the window is not closed.
if not window.closed:
module = import_module("tests_backend.window")
probe = module.WindowProbe(app, window)
window.state = WindowState.NORMAL
await probe.wait_for_window(
"Resetting window state to NORMAL", state=WindowState.NORMAL
)

if window != main_window:
kill_list.append(window)

Expand All @@ -113,7 +104,9 @@ async def window_cleanup(app, app_probe, main_window, main_window_probe):
gc.collect()

app.current_window = main_window
await main_window_probe.wait_for_window("Setting main_window as current window")
await main_window_probe.wait_for_window(
"Resetting main_window", state=WindowState.NORMAL
)


@fixture(scope="session")
Expand Down

0 comments on commit eb19ad9

Please sign in to comment.