Show More
@@ -35,14 +35,14 b' class InteractiveShellTestCase(unittest.TestCase):' | |||||
35 | # And also multi-line cells |
|
35 | # And also multi-line cells | |
36 | ip.run_cell('"""a\nb"""\n') |
|
36 | ip.run_cell('"""a\nb"""\n') | |
37 | self.assertEquals(ip.user_ns['_'], 'a\nb') |
|
37 | self.assertEquals(ip.user_ns['_'], 'a\nb') | |
38 |
|
38 | |||
39 | def test_run_empty_cell(self): |
|
39 | def test_run_empty_cell(self): | |
40 | """Just make sure we don't get a horrible error with a blank |
|
40 | """Just make sure we don't get a horrible error with a blank | |
41 | cell of input. Yes, I did overlook that.""" |
|
41 | cell of input. Yes, I did overlook that.""" | |
42 | ip = get_ipython() |
|
42 | ip = get_ipython() | |
43 | ip.run_cell('') |
|
43 | ip.run_cell('') | |
44 |
|
44 | |||
45 | def test_run_cell_multilne(self): |
|
45 | def test_run_cell_multiline(self): | |
46 | """Multi-block, multi-line cells must execute correctly. |
|
46 | """Multi-block, multi-line cells must execute correctly. | |
47 | """ |
|
47 | """ | |
48 | ip = get_ipython() |
|
48 | ip = get_ipython() | |
@@ -54,4 +54,11 b' class InteractiveShellTestCase(unittest.TestCase):' | |||||
54 | ip.run_cell(src) |
|
54 | ip.run_cell(src) | |
55 | self.assertEquals(ip.user_ns['x'], 2) |
|
55 | self.assertEquals(ip.user_ns['x'], 2) | |
56 | self.assertEquals(ip.user_ns['y'], 3) |
|
56 | self.assertEquals(ip.user_ns['y'], 3) | |
57 |
|
57 | |||
|
58 | def test_multiline_string_cells(self): | |||
|
59 | """Code sprinkled with multiline strings should execute (GH-306)""" | |||
|
60 | ip = get_ipython() | |||
|
61 | ip.run_cell('tmp=0') | |||
|
62 | self.assertEquals(ip.user_ns['tmp'], 0) | |||
|
63 | ip.run_cell('tmp=1;"""a\nb"""\n') | |||
|
64 | self.assertEquals(ip.user_ns['tmp'], 1) |
General Comments 0
You need to be logged in to leave comments.
Login now