(self)
| 533 | self.assertEqual(repr(self.top._table), expected) |
| 534 | |
| 535 | def test_lambda(self): |
| 536 | st = symtable.symtable("lambda x: x", "?", "exec") |
| 537 | self.assertEqual(len(st.get_children()), 1) |
| 538 | st = st.get_children()[0] |
| 539 | self.assertIs(st.get_type(), symtable.SymbolTableType.FUNCTION) |
| 540 | self.assertEqual(st.get_name(), "<lambda>") |
| 541 | self.assertFalse(st.is_nested()) |
| 542 | self.assertEqual(sorted(st.get_identifiers()), ["x"]) |
| 543 | self.assertEqual(st.get_children(), []) |
| 544 | |
| 545 | def test_nested_lambda(self): |
| 546 | st = symtable.symtable("lambda x: lambda y=x: y", "?", "exec") |
nothing calls this directly
no test coverage detected