summaryrefslogtreecommitdiff
path: root/Lib/test/test_asdl_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asdl_parser.py')
-rw-r--r--Lib/test/test_asdl_parser.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_asdl_parser.py b/Lib/test/test_asdl_parser.py
index 15bc684904..30e6466dbb 100644
--- a/Lib/test/test_asdl_parser.py
+++ b/Lib/test/test_asdl_parser.py
@@ -62,14 +62,16 @@ class TestAsdlParser(unittest.TestCase):
def test_attributes(self):
stmt = self.types['stmt']
- self.assertEqual(len(stmt.attributes), 2)
+ self.assertEqual(len(stmt.attributes), 4)
self.assertEqual(str(stmt.attributes[0]), 'Field(int, lineno)')
self.assertEqual(str(stmt.attributes[1]), 'Field(int, col_offset)')
+ self.assertEqual(str(stmt.attributes[2]), 'Field(int, end_lineno, opt=True)')
+ self.assertEqual(str(stmt.attributes[3]), 'Field(int, end_col_offset, opt=True)')
def test_constructor_fields(self):
ehandler = self.types['excepthandler']
self.assertEqual(len(ehandler.types), 1)
- self.assertEqual(len(ehandler.attributes), 2)
+ self.assertEqual(len(ehandler.attributes), 4)
cons = ehandler.types[0]
self.assertIsInstance(cons, self.asdl.Constructor)