MCPcopy
hub / github.com/copier-org/copier / expect_prompt

Function expect_prompt

tests/helpers.py:142–154  ·  view source on GitHub ↗

Check that we get a prompt in the standard form

(
    tui: SpawnBase,
    name: str,
    expected_type: str,
    help: str | None = None,
)

Source from the content-addressed store, hash-verified

140
141
142def expect_prompt(
143 tui: SpawnBase,
144 name: str,
145 expected_type: str,
146 help: str | None = None,
147) -> None:
148 """Check that we get a prompt in the standard form"""
149 if help:
150 tui.expect_exact(help)
151 else:
152 tui.expect_exact(name)
153 if expected_type != "str":
154 tui.expect_exact(f"({expected_type})")
155
156
157git: BaseCommand = _git.with_env(

Callers 15

test_messages_quietFunction · 0.85
test_path_completionFunction · 0.85
test_whenFunction · 0.85
test_placeholderFunction · 0.85
test_multilineFunction · 0.85
test_update_choiceFunction · 0.85
test_multiline_defaultsFunction · 0.85

Calls

no outgoing calls

Tested by 15

test_messages_quietFunction · 0.68
test_path_completionFunction · 0.68
test_whenFunction · 0.68
test_placeholderFunction · 0.68
test_multilineFunction · 0.68
test_update_choiceFunction · 0.68
test_multiline_defaultsFunction · 0.68