Show More
@@ -38,6 +38,12 b' def test_history():' | |||||
38 | ip.history_manager.store_output(3) |
|
38 | ip.history_manager.store_output(3) | |
39 |
|
39 | |||
40 | nt.assert_equal(ip.history_manager.input_hist_raw, [''] + hist) |
|
40 | nt.assert_equal(ip.history_manager.input_hist_raw, [''] + hist) | |
|
41 | ||||
|
42 | # Detailed tests for _get_range_session | |||
|
43 | grs = ip.history_manager._get_range_session | |||
|
44 | nt.assert_equal(list(grs(start=2,stop=-1)), zip([0], [2], hist[1:-1])) | |||
|
45 | nt.assert_equal(list(grs(start=-2)), zip([0,0], [2,3], hist[-2:])) | |||
|
46 | nt.assert_equal(list(grs(output=True)), zip([0,0,0], [1,2,3], zip(hist, [None,None,'spam']))) | |||
41 |
|
47 | |||
42 | # Check whether specifying a range beyond the end of the current |
|
48 | # Check whether specifying a range beyond the end of the current | |
43 | # session results in an error (gh-804) |
|
49 | # session results in an error (gh-804) |
General Comments 0
You need to be logged in to leave comments.
Login now