moo.shell.tests.test_prompt_sessions
Tests for the prompt’s interactive sub-sessions.
- Covers:
the GMCP
Editor.Starthandoff path (_try_gmcp_editor_handoff) and how _route_event chooses between handoff and the prompt-toolkit fallbackrun_editor_session callback dispatch (wizard-only, cancellation, missing callback fields)
run_paginator_session
the raw-mode editor rejection text
run_input_session: chained password prompts and timeout exit
Functions
No user → no handoff. |
|
|
If writing the |
|
A client that never sent |
|
Successful handoff: the GMCP |
An editor request in raw mode is refused with the inline-form hint. |
|
|
When the GMCP handoff returns False (no bridge), |
|
When |
run_editor_session() calls invoke_verb.delay when editor returns text and callback fields are set. |
|
run_editor_session() does not call invoke_verb.delay when the user cancels (run_editor returns None). |
|
run_editor_session() does not call invoke_verb.delay when callback fields are absent. |
|
run_editor_session() must not invoke the callback when caller_id is not a wizard (forged event guard). |
|
run_input_session() drains sequential input_prompt events from input_queue in a single call. |
|
run_input_session() returns after a timeout once no further input_prompt events arrive. |
|
run_paginator_session() delegates to run_paginator with content and content_type. |