MCPcopy Create free account
hub / github.com/ipython/ipython / test_custom_exc_count

Function test_custom_exc_count

IPython/core/tests/test_interactiveshell.py:1000–1008  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

998
999
1000def test_custom_exc_count():
1001 hook = mock.Mock(return_value=None)
1002 ip.set_custom_exc((SyntaxError,), hook)
1003 before = ip.execution_count
1004 ip.run_cell("def foo()", store_history=True)
1005 # restore default excepthook
1006 ip.set_custom_exc((), None)
1007 nt.assert_equal(hook.call_count, 1)
1008 nt.assert_equal(ip.execution_count, before + 1)
1009
1010
1011def test_run_cell_async():

Callers

nothing calls this directly

Calls 2

set_custom_excMethod · 0.80
run_cellMethod · 0.45

Tested by

no test coverage detected