-
Notifications
You must be signed in to change notification settings - Fork 181
Add DoctestScope #38
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
Add DoctestScope #38
Conversation
This should fix https://bugs.launchpad.net/pyflakes/+bug/1512184 |
Is there a way we can add a test for this? |
I'd like ideas on how to effectively test this better.
More tests will be possible when the tuples in |
Well most of the tests are based on checking some snippet, then asserting that particular errors happened, or didn't. If an exception were to be raised in the checking of the snippet that would fail the test. Is there not a snippet that will elicit the bug being fixed here? |
The test Anyway, I'll add some more tests which prevent this crash and similar crashes from slipping past code reviewers in the future. |
It's looking pretty good. You seem to understand the mechanics of the problem better than I do :) The tests make it pretty clear though, which is good. I guess all I'm looking for is a snippet that reproduces the traceback originally reported in the bug. The test could be as simple as calling |
Fix bug in 03ffc76 caused by determining the doctest global scope level based on whether parsing doctests was enabled. Also do not parse docstrings within doctests.
Merged as 93aa3c4. Thanks! |
@bitglue, Why did you alter the commit? I can not see any changes made in your amended commit. |
I only altered the parent of the commit so there isn't a superfluous merge in the git history. |
No description provided.