summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_symtable.py
diff options
context:
space:
mode:
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())