MCPcopy Index your code
hub / github.com/python/cpython / test_show_empty_flag

Method test_show_empty_flag

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

Source from the content-addressed store, hash-verified

3656 self.check_output(source, expect, flag)
3657
3658 def test_show_empty_flag(self):
3659 # test 'python -m ast --show-empty'
3660 source = 'print(1, 2, 3)'
3661 expect = '''
3662 Module(
3663 body=[
3664 Expr(
3665 value=Call(
3666 func=Name(id='print', ctx=Load()),
3667 args=[
3668 Constant(value=1),
3669 Constant(value=2),
3670 Constant(value=3)],
3671 keywords=[]))],
3672 type_ignores=[])
3673 '''
3674 self.check_output(source, expect, '--show-empty')
3675
3676
3677class ASTOptimizationTests(unittest.TestCase):

Callers

nothing calls this directly

Calls 1

check_outputMethod · 0.95

Tested by

no test coverage detected