Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix count when testing composite error output #2964

Merged
merged 3 commits into from Feb 24, 2013
Merged

Conversation

minrk
Copy link
Member

@minrk minrk commented Feb 21, 2013

fixes this failure

@takluyver
Copy link
Member

Just tested this, and there's a separate test failure on Python 3 that I hadn't spotted before (sorry):

======================================================================
ERROR: Truncate CompositeErrors with many exceptions
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/thomas/.ipy_pr_tests/venv-python3.2/lib/python3.2/site-packages/ip
ython-1.0.dev-py3.2.egg/IPython/parallel/tests/test_view.py", line 644, in test_
compositeerror_truncate
    lines = e.render_traceback()
UnboundLocalError: local variable 'e' referenced before assignment

It's this block - when you use except Exception as e:, e is now only in scope for the exception handler, to avoid a reference cycle. It's easy to work around - just assign it to another variable within the except block.

minrk added a commit that referenced this pull request Feb 24, 2013
fix count when testing composite error output

and a py3 fix in the same test
@minrk minrk merged commit e1a284b into ipython:master Feb 24, 2013
@minrk minrk deleted the testcount branch March 31, 2014 23:36
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
fix count when testing composite error output

and a py3 fix in the same test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants