| 384 | |
| 385 | |
| 386 | class TTypes(optmanager.OptManager): |
| 387 | def __init__(self): |
| 388 | super().__init__() |
| 389 | self.add_option("str", str, "str", "help") |
| 390 | self.add_option("choices", str, "foo", "help", ["foo", "bar", "baz"]) |
| 391 | self.add_option("optstr", Optional[str], "optstr", "help") |
| 392 | self.add_option("bool", bool, False, "help") |
| 393 | self.add_option("bool_on", bool, True, "help") |
| 394 | self.add_option("int", int, 0, "help") |
| 395 | self.add_option("optint", Optional[int], 0, "help") |
| 396 | self.add_option("seqstr", Sequence[str], [], "help") |
| 397 | self.add_option("unknown", float, 0.0, "help") |
| 398 | |
| 399 | |
| 400 | def test_make_parser(): |
no outgoing calls
searching dependent graphs…