MCPcopy Create free account
hub / github.com/ipython/ipython / test_extract_hist_ranges

Function test_extract_hist_ranges

IPython/core/tests/test_history.py:149–160  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

147
148
149def test_extract_hist_ranges():
150 instr = "1 2/3 ~4/5-6 ~4/7-~4/9 ~9/2-~7/5 ~10/"
151 expected = [(0, 1, 2), # 0 == current session
152 (2, 3, 4),
153 (-4, 5, 7),
154 (-4, 7, 10),
155 (-9, 2, None), # None == to end
156 (-8, 1, None),
157 (-7, 1, 6),
158 (-10, 1, None)]
159 actual = list(extract_hist_ranges(instr))
160 nt.assert_equal(actual, expected)
161
162def test_magic_rerun():
163 """Simple test for %rerun (no args -> rerun last line)"""

Callers

nothing calls this directly

Calls 1

extract_hist_rangesFunction · 0.90

Tested by

no test coverage detected