Skip to content

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

Merged
pablogsal merged 3 commits into
python:masterfrom
iritkatriel:ast-tests
May 18, 2020
Merged

bpo-40662: add test for ast.get_source_segment with missing line/col…#20157
pablogsal merged 3 commits into
python:masterfrom
iritkatriel:ast-tests

Conversation

@iritkatriel

@iritkatrieliritkatriel commented May 17, 2020

Copy link
Copy Markdown
Member

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

@remilapeyreremilapeyre left a comment

Copy link
Copy Markdown

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 !

Comment threadMisc/NEWS.d/next/Library/2020-05-18-12-56-45.bpo-40662.dfornR.rst Outdated
@pablogsal
pablogsal merged commit e6578a2 into python:masterMay 18, 2020
arturoescaip pushed a commit to arturoescaip/cpython that referenced this pull request May 24, 2020
…plete location information (pythonGH-20157)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
@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
@iritkatrieliritkatriel added the type-bug An unexpected behavior, bug, or error label Dec 23, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bugAn unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@iritkatriel@pablogsal@remilapeyre@isidentical@the-knights-who-say-ni@bedevere-bot