(self)
| 3472 | |
| 3473 | @support.requires_resource('cpu') |
| 3474 | def test_invocation(self): |
| 3475 | # test various combinations of parameters |
| 3476 | base_flags = ( |
| 3477 | ('-m=exec', '--mode=exec'), |
| 3478 | ('--no-type-comments', '--no-type-comments'), |
| 3479 | ('-a', '--include-attributes'), |
| 3480 | ('-i=4', '--indent=4'), |
| 3481 | ('--feature-version=3.13', '--feature-version=3.13'), |
| 3482 | ('-O=-1', '--optimize=-1'), |
| 3483 | ('--show-empty', '--show-empty'), |
| 3484 | ) |
| 3485 | self.set_source(''' |
| 3486 | print(1, 2, 3) |
| 3487 | def f(x: int) -> int: |
| 3488 | x -= 1 |
| 3489 | return x |
| 3490 | ''') |
| 3491 | |
| 3492 | for r in range(1, len(base_flags) + 1): |
| 3493 | for choices in itertools.combinations(base_flags, r=r): |
| 3494 | for args in itertools.product(*choices): |
| 3495 | with self.subTest(flags=args): |
| 3496 | self.invoke_ast(*args) |
| 3497 | |
| 3498 | @support.force_not_colorized |
| 3499 | def test_help_message(self): |
nothing calls this directly
no test coverage detected