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

Function test_magic_rerun

tests/test_history.py:246–253  ·  view source on GitHub ↗

Simple test for %rerun (no args -> rerun last line)

()

Source from the content-addressed store, hash-verified

244
245
246def 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
256def test_timestamp_type():

Callers

nothing calls this directly

Calls 2

get_ipythonFunction · 0.70
run_cellMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…