summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ast.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-03-22 18:33:34 (GMT)
committerGitHub <noreply@github.com>2020-03-22 18:33:34 (GMT)
commitbace59d8b8e38f5c779ff6296ebdc0527f6db14a (patch)
tree81aa39edc1e15004da1d54507484609ab0745e22 /Lib/test/test_ast.py
parent044cf94f610e831464a69a8e713dad89878824ce (diff)
downloadcpython-bace59d8b8e38f5c779ff6296ebdc0527f6db14a.zip
cpython-bace59d8b8e38f5c779ff6296ebdc0527f6db14a.tar.gz
cpython-bace59d8b8e38f5c779ff6296ebdc0527f6db14a.tar.bz2
bpo-39999: Improve compatibility of the ast module. (GH-19056)
* Re-add removed classes Suite, slice, Param, AugLoad and AugStore. * Add docstrings for dummy classes. * Add docstrings for attribute aliases. * Set __module__ to "ast" instead of "_ast".
Diffstat (limited to 'Lib/test/test_ast.py')
-rw-r--r--Lib/test/test_ast.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py
index d072c33..3fd982c 100644
--- a/Lib/test/test_ast.py
+++ b/Lib/test/test_ast.py
@@ -283,7 +283,7 @@ class AST_Tests(unittest.TestCase):
x.vararg
with self.assertRaises(TypeError):
- # "_ast.AST constructor takes 0 positional arguments"
+ # "ast.AST constructor takes 0 positional arguments"
ast.AST(2)
def test_AST_garbage_collection(self):
@@ -573,7 +573,7 @@ class AST_Tests(unittest.TestCase):
m = ast.Module([ast.Expr(ast.expr(**pos), **pos)], [])
with self.assertRaises(TypeError) as cm:
compile(m, "<test>", "exec")
- self.assertIn("but got <_ast.expr", str(cm.exception))
+ self.assertIn("but got <ast.expr", str(cm.exception))
def test_invalid_identifier(self):
m = ast.Module([ast.Expr(ast.Name(42, ast.Load()))], [])