Fix error message in test_irunner #431

wants to merge 1 commit into


None yet
1 participant

takluyver commented May 11, 2011

This is a third pull request aimed at fixing issue #409, and (hopefully) supersedes PRs #427 and #424.

I'd introduced a subtle bug when I refactored the execution logic, that changed the error message showing in certain SyntaxErrors. Then I'd been a bit over-eager to get the tests passing, because I changed the failing test to match the new error message. That was really stupid, and I apologise.

When some of us started using Python 2.7, a change in that made the code produce the correct error message again. Specifically, code to be compiled in "exec" mode no longer needs to end in a newline. So the test, expecting the incorrect error message, failed.

This fixes the bug, and puts the message in the test back to the original. I've checked that the test suite passes in both Python 2.6 and 2.7.


takluyver commented May 11, 2011

Min's updated his PR #427, so this is now pretty much a duplicate.

takluyver closed this in f02a1aa May 11, 2011

@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014

@takluyver @minrk takluyver + minrk Fix subtle bug with error message on Python 2.6 - code to be compiled…
… must end in a newline.

closes gh-409
closes gh-424
closes gh-427
closes gh-431
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment