(self)
| 888 | self.assertEqual(result, [1, 2]) |
| 889 | |
| 890 | def test_pop_all(self): |
| 891 | result = [] |
| 892 | with self.exit_stack() as stack: |
| 893 | @stack.callback |
| 894 | def _exit(): |
| 895 | result.append(3) |
| 896 | self.assertIsNotNone(_exit) |
| 897 | new_stack = stack.pop_all() |
| 898 | result.append(1) |
| 899 | result.append(2) |
| 900 | new_stack.close() |
| 901 | self.assertEqual(result, [1, 2, 3]) |
| 902 | |
| 903 | def test_exit_raise(self): |
| 904 | with self.assertRaises(ZeroDivisionError): |
nothing calls this directly
no test coverage detected