bpo-40176: Improve error messages for unclosed string literals #19346
+26
−32
Conversation
|
This message is still a bit jargon-y, I think Rust's error message in this case is pretty nice:
|
That definitely looks more simpler to those who unfamiliar with parser jargon. I'm not sure if we should still use EOF/EOL when needed or not though. |
c75e26e
to
0b6386d
| self.assertEqual(str(msg), expect) | ||
| self.assertEqual(msg.offset, 1) | ||
| else: | ||
| raise support.TestFailed | ||
|
|
||
| def test_EOFS(self): |
SylvainDe
Apr 26, 2020
Contributor
If the symbol "EOFS" is removed from the code, it may be worth changing the test name for something more explicit.
Out of curiosity, would it make sense to perform the test for both types of quotes like you did in the other test ?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
https://bugs.python.org/issue40176