-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-119780: Adjust exception messages in Lib/test/test_format.py #119781
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
gh-119780: Adjust exception messages in Lib/test/test_format.py #119781
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Lib/test/test_format.py
Outdated
@@ -82,6 +82,7 @@ def test_exc(formatstr, args, exception, excmsg): | |||
else: | |||
if verbose: print('no') | |||
print('Unexpected ', exception, ':', repr(str(exc))) | |||
raise |
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 suggest to remove this for now, and properly rewrite this function in a separate issue. This will help to backport it.
This is an ancient code which was ported to unittest. Now we can use subTest()
if we want to see multiple failures.
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.
What is the issue with backporting this change? It should work fine on 3.12 too. We can rewrite this to properly use subTest() later, but this change is small and fixes a bug that led us to miss some real test failures.
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.
The code will be different in main
and other branches, therefore conflicts, which should be resolved manually.
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.
@serhiy-storchaka, reverted. Issue description adjusted, so I don't think there should be a new issue.
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 noticing these failures.
…pythonGH-119781) Mismatches were just output to the stdout, without making the test failing.
…pythonGH-119781) Mismatches were just output to the stdout, without making the test failing.
Uh oh!
There was an error while loading. Please reload this page.