Simple test for %rerun (no args -> rerun last line)
()
| 244 | |
| 245 | |
| 246 | def test_magic_rerun(): |
| 247 | """Simple test for %rerun (no args -> rerun last line)""" |
| 248 | ip = get_ipython() |
| 249 | ip.run_cell("a = 10", store_history=True) |
| 250 | ip.run_cell("a += 1", store_history=True) |
| 251 | assert ip.user_ns["a"] == 11 |
| 252 | ip.run_cell("%rerun", store_history=True) |
| 253 | assert ip.user_ns["a"] == 12 |
| 254 | |
| 255 | |
| 256 | def test_timestamp_type(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…