()
| 1091 | |
| 1092 | |
| 1093 | def test_looks_like_flag() -> None: |
| 1094 | from cmd2.argparse_completer import ( |
| 1095 | _looks_like_flag, |
| 1096 | ) |
| 1097 | |
| 1098 | parser = Cmd2ArgumentParser() |
| 1099 | |
| 1100 | # Does not start like a flag |
| 1101 | assert not _looks_like_flag("", parser) |
| 1102 | assert not _looks_like_flag("non-flag", parser) |
| 1103 | assert not _looks_like_flag("-", parser) |
| 1104 | assert not _looks_like_flag("--has space", parser) |
| 1105 | assert not _looks_like_flag("-2", parser) |
| 1106 | |
| 1107 | # Does start like a flag |
| 1108 | assert _looks_like_flag("--", parser) |
| 1109 | assert _looks_like_flag("-flag", parser) |
| 1110 | assert _looks_like_flag("--flag", parser) |
| 1111 | |
| 1112 | |
| 1113 | def test_complete_command_no_tokens(ac_app) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…