MCPcopy Index your code
hub / github.com/ipython/ipython / test_timeit_raise_on_interrupt

Function test_timeit_raise_on_interrupt

tests/test_magic.py:942–949  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

940
941
942def test_timeit_raise_on_interrupt():
943 ip = get_ipython()
944
945 with pytest.raises(KeyboardInterrupt):
946 thread = Thread(target=_interrupt_after_1s)
947 thread.start()
948 ip.run_cell_magic("timeit", "", "from time import sleep; sleep(2)")
949 thread.join()
950
951
952@dec.skipif(execution.profile is None)

Callers

nothing calls this directly

Calls 3

get_ipythonFunction · 0.90
run_cell_magicMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…