summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_symtable.py
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2024-06-11 13:06:49 (GMT)
committerGitHub <noreply@github.com>2024-06-11 13:06:49 (GMT)
commit9b8611eeea172cd4aa626ccd1ca333dc4093cd8c (patch)
tree93491345df33ac20e4c4e87f226ff7a7e781e465 /Lib/test/test_symtable.py
parent02c1dfff073a3dd6ce34a11b038defde291c2203 (diff)
downloadcpython-9b8611eeea172cd4aa626ccd1ca333dc4093cd8c.zip
cpython-9b8611eeea172cd4aa626ccd1ca333dc4093cd8c.tar.gz
cpython-9b8611eeea172cd4aa626ccd1ca333dc4093cd8c.tar.bz2
gh-119180: PEP 649 compiler changes (#119361)
Diffstat (limited to 'Lib/test/test_symtable.py')
-rw-r--r--Lib/test/test_symtable.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_symtable.py b/Lib/test/test_symtable.py
index ef2a228..a4b111e 100644
--- a/Lib/test/test_symtable.py
+++ b/Lib/test/test_symtable.py
@@ -205,12 +205,14 @@ class SymtableTest(unittest.TestCase):
def test_annotated(self):
st1 = symtable.symtable('def f():\n x: int\n', 'test', 'exec')
- st2 = st1.get_children()[0]
+ st2 = st1.get_children()[1]
+ self.assertEqual(st2.get_type(), "function")
self.assertTrue(st2.lookup('x').is_local())
self.assertTrue(st2.lookup('x').is_annotated())
self.assertFalse(st2.lookup('x').is_global())
st3 = symtable.symtable('def f():\n x = 1\n', 'test', 'exec')
- st4 = st3.get_children()[0]
+ st4 = st3.get_children()[1]
+ self.assertEqual(st4.get_type(), "function")
self.assertTrue(st4.lookup('x').is_local())
self.assertFalse(st4.lookup('x').is_annotated())