Cell tweaks #354

merged 6 commits into from Apr 10, 2011


None yet
2 participants

takluyver commented Apr 10, 2011

This fixes and adds tests for a couple of bugs my ast refactor had introduced:

  1. Pressing return in a blank cell shouldn't increment the execution_count.
  2. We shouldn't do transformations inside multi-line strings, so entering:

should get you the same string back.

@@ -33,6 +33,9 @@ class RunnerTestCase(unittest.TestCase):
out_l = [l for l in out.splitlines() if l and not l.isspace()]
mismatch = 0
if len(output_l) != len(out_l):
+ print "\n".join(output_l)

fperez Apr 10, 2011


why is this a separate print statement rather than encoded in the failure message?


takluyver Apr 10, 2011


Primarily just because it was a frustrated "Gah, that's not helpful!" moment. You're right, I'll redo it.


fperez Apr 10, 2011


You can compute that message and just call failure with it, right?


fperez commented Apr 10, 2011

other than the small line comment, this looks good for merge. Thanks!

@takluyver takluyver merged commit 2d96c57 into ipython:master Apr 10, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment