Simple test for %rerun (no args -> rerun last line)
()
| 160 | nt.assert_equal(actual, expected) |
| 161 | |
| 162 | def test_magic_rerun(): |
| 163 | """Simple test for %rerun (no args -> rerun last line)""" |
| 164 | ip = get_ipython() |
| 165 | ip.run_cell("a = 10", store_history=True) |
| 166 | ip.run_cell("a += 1", store_history=True) |
| 167 | nt.assert_equal(ip.user_ns["a"], 11) |
| 168 | ip.run_cell("%rerun", store_history=True) |
| 169 | nt.assert_equal(ip.user_ns["a"], 12) |
| 170 | |
| 171 | def test_timestamp_type(): |
| 172 | ip = get_ipython() |
nothing calls this directly
no test coverage detected