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.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_symtable.py b/Lib/test/test_symtable.py
index 61fda76..82c1d7c 100644
--- a/Lib/test/test_symtable.py
+++ b/Lib/test/test_symtable.py
@@ -282,6 +282,10 @@ class SymtableTest(unittest.TestCase):
self.assertEqual(str(self.top), "<SymbolTable for module ?>")
self.assertEqual(str(self.spam), "<Function SymbolTable for spam in ?>")
+ def test_symtable_entry_repr(self):
+ expected = f"<symtable entry top({self.top.get_id()}), line {self.top.get_lineno()}>"
+ self.assertEqual(repr(self.top._table), expected)
+
if __name__ == '__main__':
unittest.main()