-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
bpo-45057: Simplify RegressionTestResult #28081
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-45057: Simplify RegressionTestResult #28081
Conversation
Remove code which duplicates the functionality of TextTestResult.
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.
LGTM. Yeah, it looks like most code already exists in Lib/unittest/runner.py.
I didn't check manually if the output remains the same.
| def printErrorList(self, flavor, errors): | ||
| for test, err in errors: | ||
| self.stream.write(self.separator1) | ||
| self.stream.write(f'{flavor}: {self.getDescription(test)}\n') |
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.
You can modernize printErrors() in Lib/unittest/runner.py. It contains very useless code like "%s" % err.
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.
Maybe in other PR. This PR does not touch that file.
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.
As you want, it was just a remark. I approved your PR (and you merged it ;-))
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
|
GH-28101 is a backport of this pull request to the 3.10 branch. |
Remove code which duplicates the functionality of TextTestResult. (cherry picked from commit 2b76a53) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Remove code which duplicates the functionality of TextTestResult.. (cherry picked from commit 2b76a53) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
GH-28103 is a backport of this pull request to the 3.9 branch. |
|
For me this change is just refactoring and not bugfix, you can backport it, but usually I prefer to leave stable branches unchanged. |
|
It is internal code, and it can help when backport changes to TextTestResult. I prefer to backport test changes. |
|
|
Remove code which duplicates the functionality of TextTestResult.
https://bugs.python.org/issue45057