-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Improve string fstring coverage #4231
Improve string fstring coverage #4231
Conversation
4202468
to
fdc5746
Compare
0871a91
to
afcfa62
Compare
@charliermarsh could you review this PR when it is ready? |
There are currently a bunch of unexpectedly passing tests in |
The change on python.lalrpop might be extended to all binop. What do you think ? |
1b4db38
to
c00f9b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contributing. I left a few comments about policy and styles.
@charliermarsh Could you please do the technical review?
Lib/test/test_global.py
Outdated
@@ -25,15 +25,15 @@ def wrong1(): | |||
global a | |||
global b | |||
""" | |||
check_syntax_error(self, prog_text_1, lineno=4, offset=5) | |||
check_syntax_error(self, prog_text_1, lineno=4, offset=4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We mostly try not to make changes in cpython-originated code.
Please keep this as original code and add @unittest.expectedFailure
if you cannot keep this compatibility with the patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change might be handle the same way this CPython commit handles it 025eb98dc0: make all syntax error 1-based by incrementing location in "constructor" by 1.
That should go into another issue, don't you think ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, thank you! good to know.
5c8de04
to
739d15a
Compare
Can you split d34d361 into two separate commits: one commit adding the test file, and one commit adding the RustPython changes? |
(I promise to review when I can, if others get to it first no prob.) |
739d15a
to
8787a52
Compare
Done |
Looks like some more unexpected success appeared |
64952ae
to
24ee353
Compare
which version of CPython did you use for d48d998 ? |
2c821e4
to
cbcfb9f
Compare
part of: RustPython#1671
cbcfb9f
to
def4da5
Compare
I took it from CPython 3.10.8 |
I think @youknowone wants you to amend the commit name to mention that version. |
@charliermarsh It looks like it's how CPython handles it regarding how it improve coverage in test_ast.py. Also @youknowone already merged this part of the PR. |
def4da5
to
af04e3e
Compare
commit amended with the CPython version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dvermd Thank you! This is a big progress!
@charliermarsh @fanninpm Thank you for the reviews!
The test_fstring.py file comes from CPython
This improve coverage as of #1671.