()
| 111 | |
| 112 | |
| 113 | def test_argument_order(): |
| 114 | cli = Command( |
| 115 | "cli", |
| 116 | params=[ |
| 117 | Argument(["plain"]), |
| 118 | Argument(["c1"], type=Choice(["a1", "a2", "b"])), |
| 119 | Argument(["c2"], type=Choice(["c1", "c2", "d"])), |
| 120 | ], |
| 121 | ) |
| 122 | # first argument has no completions |
| 123 | assert _get_words(cli, [], "") == [] |
| 124 | assert _get_words(cli, [], "a") == [] |
| 125 | # first argument filled, now completion can happen |
| 126 | assert _get_words(cli, ["x"], "a") == ["a1", "a2"] |
| 127 | assert _get_words(cli, ["x", "b"], "d") == ["d"] |
| 128 | |
| 129 | |
| 130 | def test_argument_default(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…