##// END OF EJS Templates
Fix '%%cellm?' case, make tests more stringent to catch error.
Fernando Perez -
Show More
@@ -840,7 +840,7 b' class IPythonInputSplitter(InputSplitter):'
840 # If the entire input block is a cell magic, return after handling it
840 # If the entire input block is a cell magic, return after handling it
841 # as the rest of the transformation logic should be skipped.
841 # as the rest of the transformation logic should be skipped.
842 if lines.startswith('%%') and not \
842 if lines.startswith('%%') and not \
843 (len(lines.splitlines()) == 1 and lines.endswith('?')):
843 (len(lines.splitlines()) == 1 and lines.strip().endswith('?')):
844 return self._handle_cell_magic(lines)
844 return self._handle_cell_magic(lines)
845
845
846 # In line mode, a cell magic can arrive in separate pieces
846 # In line mode, a cell magic can arrive in separate pieces
@@ -624,7 +624,7 b' class IPythonInputTestCase(InputSplitterTestCase):'
624 if raw.startswith(' '):
624 if raw.startswith(' '):
625 continue
625 continue
626
626
627 isp.push(raw)
627 isp.push(raw+'\n')
628 out, out_raw = isp.source_raw_reset()
628 out, out_raw = isp.source_raw_reset()
629 self.assertEqual(out.rstrip(), out_t,
629 self.assertEqual(out.rstrip(), out_t,
630 tt.pair_fail_msg.format("inputsplitter",raw, out_t, out))
630 tt.pair_fail_msg.format("inputsplitter",raw, out_t, out))
General Comments 0
You need to be logged in to leave comments. Login now