MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_exit_raise

Method test_exit_raise

Lib/test/test_contextlib.py:834–838  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

832 self.assertEqual(result, [1, 2, 3])
833
834 def test_exit_raise(self):
835 with self.assertRaises(ZeroDivisionError):
836 with self.exit_stack() as stack:
837 stack.push(lambda *exc: False)
838 1/0
839
840 def test_exit_suppress(self):
841 with self.exit_stack() as stack:

Callers

nothing calls this directly

Calls 2

assertRaisesMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected