(self)
| 819 | self.assertEqual(result, [1, 2]) |
| 820 | |
| 821 | def test_pop_all(self): |
| 822 | result = [] |
| 823 | with self.exit_stack() as stack: |
| 824 | @stack.callback |
| 825 | def _exit(): |
| 826 | result.append(3) |
| 827 | self.assertIsNotNone(_exit) |
| 828 | new_stack = stack.pop_all() |
| 829 | result.append(1) |
| 830 | result.append(2) |
| 831 | new_stack.close() |
| 832 | self.assertEqual(result, [1, 2, 3]) |
| 833 | |
| 834 | def test_exit_raise(self): |
| 835 | with self.assertRaises(ZeroDivisionError): |
nothing calls this directly
no test coverage detected