MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_eval_mode_flag

Method test_eval_mode_flag

Lib/test/test_ast/test_ast.py:3538–3552  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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'

Callers

nothing calls this directly

Calls 2

check_outputMethod · 0.95
subTestMethod · 0.80

Tested by

no test coverage detected