(base_app: cmd2.Cmd)
| 2123 | |
| 2124 | |
| 2125 | def test_resolve_completer_with_choices(base_app: cmd2.Cmd) -> None: |
| 2126 | from cmd2.pt_utils import Cmd2Completer |
| 2127 | |
| 2128 | choices = ["apple", "banana", "cherry"] |
| 2129 | completer = base_app._resolve_completer(choices=choices) |
| 2130 | assert isinstance(completer, Cmd2Completer) |
| 2131 | |
| 2132 | # Verify contents |
| 2133 | settings = completer.custom_settings |
| 2134 | assert settings is not None |
| 2135 | |
| 2136 | action = settings.parser._actions[-1] |
| 2137 | assert action.choices == choices |
| 2138 | assert not settings.preserve_quotes |
| 2139 | |
| 2140 | |
| 2141 | def test_resolve_completer_with_choices_provider(base_app: cmd2.Cmd) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…