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

Function test_time_raise_on_interrupt

tests/test_magic.py:1880–1887  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1878
1879
1880def test_time_raise_on_interrupt():
1881 ip = get_ipython()
1882
1883 with pytest.raises(KeyboardInterrupt):
1884 thread = Thread(target=_interrupt_after_1s)
1885 thread.start()
1886 ip.run_cell_magic("time", "", "from time import sleep; sleep(2)")
1887 thread.join()
1888
1889
1890MINIMAL_LAZY_MAGIC = """

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…