mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-130139: always check ast node type in ast.parse() with ast input (#130140)
This commit is contained in:
parent
2e8044a4f7
commit
c9b1bf302c
8 changed files with 73 additions and 32 deletions
|
@ -422,9 +422,9 @@ class UnparseTestCase(ASTTestCase):
|
|||
self.check_ast_roundtrip(f"'''{docstring}'''")
|
||||
|
||||
def test_constant_tuples(self):
|
||||
self.check_src_roundtrip(ast.Constant(value=(1,), kind=None), "(1,)")
|
||||
self.check_src_roundtrip(ast.Module([ast.Constant(value=(1,))]), "(1,)")
|
||||
self.check_src_roundtrip(
|
||||
ast.Constant(value=(1, 2, 3), kind=None), "(1, 2, 3)"
|
||||
ast.Module([ast.Constant(value=(1, 2, 3))]), "(1, 2, 3)"
|
||||
)
|
||||
|
||||
def test_function_type(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue