()
| 1878 | |
| 1879 | |
| 1880 | def 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 | |
| 1890 | MINIMAL_LAZY_MAGIC = """ |
nothing calls this directly
no test coverage detected
searching dependent graphs…