(static_subcommands_app)
| 761 | |
| 762 | |
| 763 | def test_static_subcommands(static_subcommands_app) -> None: |
| 764 | cmds_cats, _help_topics = static_subcommands_app._build_command_info() |
| 765 | assert "Fruits" in cmds_cats |
| 766 | |
| 767 | text = "" |
| 768 | line = f"cut {text}" |
| 769 | endidx = len(line) |
| 770 | begidx = endidx |
| 771 | completions = static_subcommands_app.complete(text, line, begidx, endidx) |
| 772 | |
| 773 | # check that the alias shows up correctly |
| 774 | assert completions.to_strings() == Completions.from_values(["banana", "bananer", "bokchoy"]).to_strings() |
| 775 | |
| 776 | text = "" |
| 777 | line = f"cut bokchoy {text}" |
| 778 | endidx = len(line) |
| 779 | begidx = endidx |
| 780 | completions = static_subcommands_app.complete(text, line, begidx, endidx) |
| 781 | |
| 782 | # verify that argparse completer in commandset functions correctly |
| 783 | assert completions.to_strings() == Completions.from_values(["diced", "quartered"]).to_strings() |
| 784 | |
| 785 | |
| 786 | complete_states_expected_self = None |
nothing calls this directly
no test coverage detected
searching dependent graphs…