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

bpo-40662: add test for ast.get_source_segment with missing line/col… #20157

Merged
merged 3 commits into from
May 18, 2020

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented May 17, 2020

Added a unit test for ast.get_source_segment() on a node that has incomplete location information, expecting None as per the docstring. Added a possible fix to the code.

https://bugs.python.org/issue40662

…info, and fix behaviour to match the docstring
Copy link
Contributor

@remilapeyre remilapeyre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix and the tests @iritkatriel !

@pablogsal pablogsal merged commit e6578a2 into python:master May 18, 2020
arturoescaip pushed a commit to arturoescaip/cpython that referenced this pull request May 24, 2020
@iritkatriel iritkatriel deleted the ast-tests branch August 3, 2020 17:32
@iritkatriel iritkatriel restored the ast-tests branch August 3, 2020 17:32
@iritkatriel iritkatriel deleted the ast-tests branch August 16, 2020 13:16
@iritkatriel iritkatriel added the type-bug An unexpected behavior, bug, or error label Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants