()
| 128 | |
| 129 | |
| 130 | def test_argument_default(): |
| 131 | cli = Command( |
| 132 | "cli", |
| 133 | add_help_option=False, |
| 134 | params=[ |
| 135 | Argument(["a"], type=Choice(["a"]), default="a"), |
| 136 | Argument(["b"], type=Choice(["b"]), default="b"), |
| 137 | ], |
| 138 | ) |
| 139 | assert _get_words(cli, [], "") == ["a"] |
| 140 | assert _get_words(cli, ["a"], "b") == ["b"] |
| 141 | # ignore type validation |
| 142 | assert _get_words(cli, ["x"], "b") == ["b"] |
| 143 | |
| 144 | |
| 145 | def test_type_choice(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…