(autoload_command_sets_app)
| 128 | |
| 129 | |
| 130 | def test_autoload_commands(autoload_command_sets_app) -> None: |
| 131 | # verifies that, when autoload is enabled, CommandSets and registered functions all show up |
| 132 | |
| 133 | cmds_cats, _help_topics = autoload_command_sets_app._build_command_info() |
| 134 | |
| 135 | assert "Alone" in cmds_cats |
| 136 | assert "elderberry" in cmds_cats["Alone"] |
| 137 | assert "main" in cmds_cats["Alone"] |
| 138 | |
| 139 | # Test subcommand was autoloaded |
| 140 | result = autoload_command_sets_app.app_cmd("main sub") |
| 141 | assert "Subcommand Ran" in result.stdout |
| 142 | |
| 143 | assert "Also Alone" in cmds_cats |
| 144 | assert "durian" in cmds_cats["Also Alone"] |
| 145 | |
| 146 | assert "Fruits" in cmds_cats |
| 147 | assert "cranberry" in cmds_cats["Fruits"] |
| 148 | |
| 149 | assert "Command Set B" not in cmds_cats |
| 150 | |
| 151 | |
| 152 | def test_command_synonyms() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…