##// END OF EJS Templates
Don't increment execution_count on empty cells. +test.
Thomas Kluyver -
Show More
@@ -2118,6 +2118,9 b' class InteractiveShell(Configurable, Magic):'
2118 2118 history. For user code calling back into IPython's machinery, this
2119 2119 should be set to False.
2120 2120 """
2121 if not cell.strip():
2122 return
2123
2121 2124 raw_cell = cell
2122 2125 with self.builtin_trap:
2123 2126 cell = self.prefilter_manager.prefilter_lines(cell)
@@ -41,7 +41,9 b' class InteractiveShellTestCase(unittest.TestCase):'
41 41 """Just make sure we don't get a horrible error with a blank
42 42 cell of input. Yes, I did overlook that."""
43 43 ip = get_ipython()
44 old_xc = ip.execution_count
44 45 ip.run_cell('')
46 self.assertEquals(ip.execution_count, old_xc)
45 47
46 48 def test_run_cell_multiline(self):
47 49 """Multi-block, multi-line cells must execute correctly.
General Comments 0
You need to be logged in to leave comments. Login now