summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asdl_parser.py
diff options
context:
space:
mode:
authorBatuhan Taşkaya <47358913+isidentical@users.noreply.github.com>2020-03-16 08:12:53 (GMT)
committerGitHub <noreply@github.com>2020-03-16 08:12:53 (GMT)
commit4ab362cec6dc68c798b3e354f687cf39e207b9a9 (patch)
treefd3e04e72101bda5ade2fc0ee4437974a53daa9b /Lib/test/test_asdl_parser.py
parent5b66ec166b81c8a77286da2c0d17be3579c3069a (diff)
downloadcpython-4ab362cec6dc68c798b3e354f687cf39e207b9a9.zip
cpython-4ab362cec6dc68c798b3e354f687cf39e207b9a9.tar.gz
cpython-4ab362cec6dc68c798b3e354f687cf39e207b9a9.tar.bz2
bpo-39638: Keep ASDL signatures in the AST nodes (GH-18515)
Diffstat (limited to 'Lib/test/test_asdl_parser.py')
-rw-r--r--Lib/test/test_asdl_parser.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_asdl_parser.py b/Lib/test/test_asdl_parser.py
index d3306c2..2c14817 100644
--- a/Lib/test/test_asdl_parser.py
+++ b/Lib/test/test_asdl_parser.py
@@ -63,10 +63,10 @@ class TestAsdlParser(unittest.TestCase):
def test_attributes(self):
stmt = self.types['stmt']
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)')
+ self.assertEqual(repr(stmt.attributes[0]), 'Field(int, lineno)')
+ self.assertEqual(repr(stmt.attributes[1]), 'Field(int, col_offset)')
+ self.assertEqual(repr(stmt.attributes[2]), 'Field(int, end_lineno, opt=True)')
+ self.assertEqual(repr(stmt.attributes[3]), 'Field(int, end_col_offset, opt=True)')
def test_constructor_fields(self):
ehandler = self.types['excepthandler']