MCPcopy Index your code
hub / github.com/python/cpython / test_exit_raise

Method test_exit_raise

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

Source from the content-addressed store, hash-verified

901 self.assertEqual(result, [1, 2, 3])
902
903 def test_exit_raise(self):
904 with self.assertRaises(ZeroDivisionError):
905 with self.exit_stack() as stack:
906 stack.push(lambda *exc: False)
907 1/0
908
909 def test_exit_suppress(self):
910 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