Cell tweaks #354

Merged
merged 6 commits into from Apr 10, 2011

Conversation

Projects
None yet
2 participants
Owner

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:
"""
%lsmagic
"""

should get you the same string back.

IPython/lib/tests/test_irunner.py
@@ -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

fperez Apr 10, 2011

Owner

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

@takluyver

takluyver Apr 10, 2011

Owner

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

@fperez

fperez Apr 10, 2011

Owner

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

Owner

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