()
| 1072 | |
| 1073 | |
| 1074 | def test_single_prefix_char() -> None: |
| 1075 | from cmd2.argparse_completer import ( |
| 1076 | _single_prefix_char, |
| 1077 | ) |
| 1078 | |
| 1079 | parser = Cmd2ArgumentParser(prefix_chars="-+") |
| 1080 | |
| 1081 | # Invalid |
| 1082 | assert not _single_prefix_char("", parser) |
| 1083 | assert not _single_prefix_char("--", parser) |
| 1084 | assert not _single_prefix_char("-+", parser) |
| 1085 | assert not _single_prefix_char("++has space", parser) |
| 1086 | assert not _single_prefix_char("foo", parser) |
| 1087 | |
| 1088 | # Valid |
| 1089 | assert _single_prefix_char("-", parser) |
| 1090 | assert _single_prefix_char("+", parser) |
| 1091 | |
| 1092 | |
| 1093 | def test_looks_like_flag() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…