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-40334: Fix test_peg_parser to actually use the old parser #19778

Merged
merged 1 commit into from Apr 29, 2020

Conversation

lysnikolaou
Copy link
Contributor

@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
Contributor Author

lysnikolaou commented Apr 29, 2020

@pablogsal Can we merge this?

@pablogsal pablogsal merged commit 69e802e into python:master Apr 29, 2020
4 checks passed
@lysnikolaou lysnikolaou deleted the fix-test-peg-parser branch Apr 29, 2020
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.

None yet

4 participants