Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions tests/test_tui_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1728,7 +1728,10 @@ async def test_cleanup_unknown_sessions_notifies(project, monkeypatch):
await until(pilot, lambda: isinstance(app.screen, ConfirmModal))
await pilot.click(await ready(pilot, "#ok"))
await until(pilot, lambda: any("unverifiable engine pid" in m for m in notifications(app)))
assert any("removed 1 session(s)" in m for m in notifications(app))
# `until`, not a bare assert: the summary toast is marshalled from the
# worker AFTER the pid warning, so waiting on the earlier one does not
# guarantee this one has reached the message pump yet (Windows flake).
await until(pilot, lambda: any("removed 1 session(s)" in m for m in notifications(app)))


async def test_cleanup_sessions_mux_error_notifies(project, monkeypatch):
Expand Down Expand Up @@ -1760,7 +1763,10 @@ def boom(_p):
# the ctl-window failure is surfaced, but the session pruning that already
# completed is still reported — not swallowed by an early return
await until(pilot, lambda: any("unverifiable engine pid" in m for m in notifications(app)))
assert any("removed 1 session(s)" in m for m in notifications(app))
# `until`, not a bare assert: the summary toast is marshalled from the
# worker AFTER the pid warning, so waiting on the earlier one does not
# guarantee this one has reached the message pump yet (Windows flake).
await until(pilot, lambda: any("removed 1 session(s)" in m for m in notifications(app)))
assert isinstance(app.screen, DashboardScreen) # worker failed soft, no crash


Expand Down