https://github.com/python/cpython/commit/aa8f6d2708bce1462544d2e2cae05a2595ffd9ec
commit: aa8f6d2708bce1462544d2e2cae05a2595ffd9ec
branch: main
author: Kirill Podoprigora <[email protected]>
committer: JelleZijlstra <[email protected]>
date: 2024-04-29T05:38:46Z
summary:

gh-118374: test_ast: Add ``ctx`` argument to ``ast.Name`` calls (#118375)

files:
M Lib/test/test_ast.py

diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py
index 44bcb9bae1cfde..68024304dfb746 100644
--- a/Lib/test/test_ast.py
+++ b/Lib/test/test_ast.py
@@ -1353,13 +1353,13 @@ def test_dump_incomplete(self):
             [],
             [ast.keyword('a', ast.Constant(None))],
             [],
-            [ast.Name('dataclass')],
+            [ast.Name('dataclass', ctx=ast.Load())],
         )
         self.assertEqual(ast.dump(node),
-            "ClassDef(name='T', keywords=[keyword(arg='a', 
value=Constant(value=None))], decorator_list=[Name(id='dataclass')])",
+            "ClassDef(name='T', keywords=[keyword(arg='a', 
value=Constant(value=None))], decorator_list=[Name(id='dataclass', 
ctx=Load())])",
         )
         self.assertEqual(ast.dump(node, annotate_fields=False),
-            "ClassDef('T', [], [keyword('a', Constant(None))], [], 
[Name('dataclass')])",
+            "ClassDef('T', [], [keyword('a', Constant(None))], [], 
[Name('dataclass', Load())])",
         )
 
     def test_dump_show_empty(self):

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to