(self, parser: parseopt.Parser)
| 151 | assert option.hello == "x" |
| 152 | |
| 153 | def test_parse_setoption(self, parser: parseopt.Parser) -> None: |
| 154 | parser.addoption("--hello", dest="hello", action="store") |
| 155 | parser.addoption("--world", dest="world", default=42) |
| 156 | |
| 157 | option = argparse.Namespace() |
| 158 | args = parser.parse_setoption(["--hello", "world"], option) |
| 159 | assert option.hello == "world" |
| 160 | assert option.world == 42 |
| 161 | assert not args |
| 162 | |
| 163 | def test_parse_special_destination(self, parser: parseopt.Parser) -> None: |
| 164 | parser.addoption("--ultimate-answer", type=int) |
nothing calls this directly
no test coverage detected