(self)
| 3536 | self.check_output(source, expect, flag) |
| 3537 | |
| 3538 | def test_eval_mode_flag(self): |
| 3539 | # test 'python -m ast -m/--mode eval' |
| 3540 | source = 'print(1, 2, 3)' |
| 3541 | expect = ''' |
| 3542 | Expression( |
| 3543 | body=Call( |
| 3544 | func=Name(id='print', ctx=Load()), |
| 3545 | args=[ |
| 3546 | Constant(value=1), |
| 3547 | Constant(value=2), |
| 3548 | Constant(value=3)])) |
| 3549 | ''' |
| 3550 | for flag in ('-m=eval', '--mode=eval'): |
| 3551 | with self.subTest(flag=flag): |
| 3552 | self.check_output(source, expect, flag) |
| 3553 | |
| 3554 | def test_func_type_mode_flag(self): |
| 3555 | # test 'python -m ast -m/--mode func_type' |
nothing calls this directly
no test coverage detected