Show More
@@ -21,6 +21,7 b' import unittest' | |||||
21 |
|
21 | |||
22 | from IPython.testing.decorators import skipif |
|
22 | from IPython.testing.decorators import skipif | |
23 | from IPython.utils import py3compat |
|
23 | from IPython.utils import py3compat | |
|
24 | from IPython.testing import tools as tt | |||
24 |
|
25 | |||
25 | class InteractiveShellTestCase(unittest.TestCase): |
|
26 | class InteractiveShellTestCase(unittest.TestCase): | |
26 | def rl_hist_entries(self, rl, n): |
|
27 | def rl_hist_entries(self, rl, n): | |
@@ -169,3 +170,15 b' class InteractiveShellTestCase(unittest.TestCase):' | |||||
169 | enc = sys.stdin.encoding or "utf-8" |
|
170 | enc = sys.stdin.encoding or "utf-8" | |
170 | expected = [ py3compat.unicode_to_str(e, enc) for e in expected ] |
|
171 | expected = [ py3compat.unicode_to_str(e, enc) for e in expected ] | |
171 | self.assertEqual(hist, expected) |
|
172 | self.assertEqual(hist, expected) | |
|
173 | ||||
|
174 | def test_paste_magics_message(self): | |||
|
175 | """Test that an IndentationError while using paste magics doesn't | |||
|
176 | trigger a message about paste magics and also the opposite.""" | |||
|
177 | ||||
|
178 | ip = get_ipython() | |||
|
179 | s = ''' sum([1, 2, | |||
|
180 | 3, 4])''' | |||
|
181 | ||||
|
182 | with tt.AssertPrints("If you want to paste code into IPython, try the " | |||
|
183 | "%paste and %cpaste magic functions."): | |||
|
184 | ip.run_cell(s) |
General Comments 0
You need to be logged in to leave comments.
Login now