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 #11312: nonlocal does not raise SyntaxError #11382

Merged
merged 3 commits into from
Oct 10, 2018
Merged

Fix #11312: nonlocal does not raise SyntaxError #11382

merged 3 commits into from
Oct 10, 2018

Conversation

felixzhuologist
Copy link
Contributor

@felixzhuologist felixzhuologist commented Oct 9, 2018

As we traverse the AST, keep track of the depth in terms of the function call stack so that we can check for different invalid AstNodes at each depth and terminate early when possible. Fixes #11312

@felixzhuologist
Copy link
Contributor Author

@Carreau I'd like to add a test for this but I couldn't figure out how to run tests - I tried various forms of python3 -m unittest core.tests.test_async_helpers but ended up getting import errors. Would you be able to point me to some info about running unittests?

@Carreau
Copy link
Member

Carreau commented Oct 9, 2018

running test is a bit weird as we are a python shell.
You need to not be in IPython directory and run iptest

To run a single test I would for example run

$ cd ; iptest IPython.core.tests.test_inputtransformer2:test_check_complete; cd -

You can also just push on the branch and let Travis CI work for you :-)

@Carreau Carreau added this to the 7.1 milestone Oct 9, 2018
@felixzhuologist
Copy link
Contributor Author

Awesome, that works. Thanks!

@minrk minrk merged commit 940dd60 into ipython:master Oct 10, 2018
@minrk
Copy link
Member

minrk commented Oct 10, 2018

Thanks!

@Carreau Carreau added the Hacktoberfest you want to participate to hacktoberfest ? Here is an easy issue. label Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
async/await Hacktoberfest you want to participate to hacktoberfest ? Here is an easy issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants