Skip to content

bpo-40334: Fix test_peg_parser to actually use the old parser#19778

Merged
pablogsal merged 1 commit intopython:masterfrom
lysnikolaou:fix-test-peg-parser
Apr 29, 2020
Merged

bpo-40334: Fix test_peg_parser to actually use the old parser#19778
pablogsal merged 1 commit intopython:masterfrom
lysnikolaou:fix-test-peg-parser

Conversation

@lysnikolaou
Copy link
Member

@lysnikolaou lysnikolaou commented Apr 28, 2020

Now that the default parser is the new PEG parser, ast.parse uses
it, which means that we don't actually test something in
test_peg_parser. This PR introduces a new kwarg oldparser for
_peg_parser.parse_string for specifying that a string needs to
be parsed with the old parser. This kwarg is used in the tests to
actually compare the ASTs the new parser generates with those
generated by the old parser.

Closes we-like-parsers/cpyhton#93.

https://bugs.python.org/issue40334

Now that the default parser is the new PEG parser, ast.parse uses
it, which means that we don't actually test something in
test_peg_parser. This PR introduces a new kwarg `oldparser` for
`_peg_parser.parse_string` for specifying that a string needs to
be parsed with the old parser. This kwarg is used in the tests to
actually compare the ASTs the new parser generates with those
generated by the old parser.

Closes we-like-parsers/cpyhton#93.
@pablogsal
Copy link
Member

pablogsal commented Apr 29, 2020

Closing and opening to re-trigger the CI

@pablogsal pablogsal closed this Apr 29, 2020
@pablogsal pablogsal reopened this Apr 29, 2020
@lysnikolaou
Copy link
Member Author

@pablogsal Can we merge this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants