Show More
@@ -38,10 +38,13 b' class InteractiveShellTestCase(unittest.TestCase):' | |||
|
38 | 38 | """Test that function does not throw on windows without |
|
39 | 39 | remove_history_item""" |
|
40 | 40 | ip = get_ipython() |
|
41 | if hasattr(ip.readline, 'remove_history_item'): | |
|
41 | 42 | del ip.readline.remove_history_item |
|
42 | 43 | ip._replace_rlhist_multiline(u'source', 0) |
|
43 | 44 | |
|
44 | 45 | @skipif(not get_ipython().has_readline, 'no readline') |
|
46 | @skipif(not hasattr(get_ipython().readline, 'remove_history_item'), | |
|
47 | 'no remove_history_item') | |
|
45 | 48 | def test_replace_multiline_hist_disabled(self): |
|
46 | 49 | """Test that multiline replace does nothing if disabled""" |
|
47 | 50 | ip = get_ipython() |
@@ -60,6 +63,8 b' class InteractiveShellTestCase(unittest.TestCase):' | |||
|
60 | 63 | self.assertEquals(hist, ghist) |
|
61 | 64 | |
|
62 | 65 | @skipif(not get_ipython().has_readline, 'no readline') |
|
66 | @skipif(not hasattr(get_ipython().readline, 'remove_history_item'), | |
|
67 | 'no remove_history_item') | |
|
63 | 68 | def test_replace_multiline_hist_adds(self): |
|
64 | 69 | """Test that multiline replace function adds history""" |
|
65 | 70 | ip = get_ipython() |
@@ -71,6 +76,8 b' class InteractiveShellTestCase(unittest.TestCase):' | |||
|
71 | 76 | ip.readline.get_current_history_length()) |
|
72 | 77 | |
|
73 | 78 | @skipif(not get_ipython().has_readline, 'no readline') |
|
79 | @skipif(not hasattr(get_ipython().readline, 'remove_history_item'), | |
|
80 | 'no remove_history_item') | |
|
74 | 81 | def test_replace_multiline_hist_keeps_history(self): |
|
75 | 82 | """Test that multiline replace does not delete history""" |
|
76 | 83 | ip = get_ipython() |
@@ -93,6 +100,8 b' class InteractiveShellTestCase(unittest.TestCase):' | |||
|
93 | 100 | |
|
94 | 101 | |
|
95 | 102 | @skipif(not get_ipython().has_readline, 'no readline') |
|
103 | @skipif(not hasattr(get_ipython().readline, 'remove_history_item'), | |
|
104 | 'no remove_history_item') | |
|
96 | 105 | def test_replace_multiline_hist_replaces_twice(self): |
|
97 | 106 | """Test that multiline entries are replaced twice""" |
|
98 | 107 | ip = get_ipython() |
@@ -119,6 +128,8 b' class InteractiveShellTestCase(unittest.TestCase):' | |||
|
119 | 128 | |
|
120 | 129 | |
|
121 | 130 | @skipif(not get_ipython().has_readline, 'no readline') |
|
131 | @skipif(not hasattr(get_ipython().readline, 'remove_history_item'), | |
|
132 | 'no remove_history_item') | |
|
122 | 133 | def test_replace_multiline_hist_replaces_empty_line(self): |
|
123 | 134 | """Test that multiline history skips empty line cells""" |
|
124 | 135 | ip = get_ipython() |
General Comments 0
You need to be logged in to leave comments.
Login now