Show More
@@ -141,14 +141,15 b' def test_history():' | |||||
141 |
|
141 | |||
142 |
|
142 | |||
143 | def test_extract_hist_ranges(): |
|
143 | def test_extract_hist_ranges(): | |
144 | instr = "1 2/3 ~4/5-6 ~4/7-~4/9 ~9/2-~7/5" |
|
144 | instr = "1 2/3 ~4/5-6 ~4/7-~4/9 ~9/2-~7/5 ~10/" | |
145 | expected = [(0, 1, 2), # 0 == current session |
|
145 | expected = [(0, 1, 2), # 0 == current session | |
146 | (2, 3, 4), |
|
146 | (2, 3, 4), | |
147 | (-4, 5, 7), |
|
147 | (-4, 5, 7), | |
148 | (-4, 7, 10), |
|
148 | (-4, 7, 10), | |
149 | (-9, 2, None), # None == to end |
|
149 | (-9, 2, None), # None == to end | |
150 | (-8, 1, None), |
|
150 | (-8, 1, None), | |
151 |
(-7, 1, 6) |
|
151 | (-7, 1, 6) | |
|
152 | (-10, 1, None)] | |||
152 | actual = list(extract_hist_ranges(instr)) |
|
153 | actual = list(extract_hist_ranges(instr)) | |
153 | nt.assert_equal(actual, expected) |
|
154 | nt.assert_equal(actual, expected) | |
154 |
|
155 |
General Comments 0
You need to be logged in to leave comments.
Login now