A CommandSet that isn't related to SupportFuncProvider which uses its support function
| 826 | |
| 827 | |
| 828 | class SupportFuncUserUnrelated(cmd2.CommandSet): |
| 829 | """A CommandSet that isn't related to SupportFuncProvider which uses its support function""" |
| 830 | |
| 831 | def __init__(self, dummy) -> None: |
| 832 | """Dummy variable prevents this from being autoloaded in other tests""" |
| 833 | super().__init__() |
| 834 | |
| 835 | parser = cmd2.Cmd2ArgumentParser() |
| 836 | parser.add_argument("state", type=str, completer=SupportFuncProvider.complete_states) |
| 837 | |
| 838 | @cmd2.with_argparser(parser) |
| 839 | def do_user_unrelated(self, ns: argparse.Namespace) -> None: |
| 840 | """User Unrelated Command""" |
| 841 | self._cmd.poutput(f"something {ns.state}") |
| 842 | |
| 843 | |
| 844 | def test_cross_commandset_completer(manual_command_sets_app) -> None: |
no outgoing calls
searching dependent graphs…