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

Function test_extract_hist_ranges

tests/test_history.py:192–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

190
191
192def test_extract_hist_ranges():
193 instr = "1 2/3 ~4/5-6 ~4/7-~4/9 ~9/2-~7/5 ~10/"
194 expected = [
195 (0, 1, 2), # 0 == current session
196 (2, 3, 4),
197 (-4, 5, 7),
198 (-4, 7, 10),
199 (-9, 2, None), # None == to end
200 (-8, 1, None),
201 (-7, 1, 6),
202 (-10, 1, None),
203 ]
204 actual = list(extract_hist_ranges(instr))
205 assert actual == expected
206
207
208def test_extract_hist_ranges_empty_str():

Callers

nothing calls this directly

Calls 1

extract_hist_rangesFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…