GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-123378: fix a crash in `UnicodeError.__str__` by picnixz · Pull Request #124935 · python/cpython Conversation
|
|
|
||
| def test_unicode_error_str_gh_123378(self): | ||
| for formatter, start, end, obj in product( | ||
| (str, repr), |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Testing repr() if we already test str() sounds redundant to me. Is it really worth it?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No you're right. I'll remove it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| for klass in klasses: | ||
| self.assertEqual(str(klass.__new__(klass)), "") | ||
|
|
||
| def test_unicode_error_str_gh_123378(self): |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The purpose of the test is unclear to me, it just calls str(). Please add a comment to explain that you check that str() doesn't crash with a reference to the issue.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| (str, repr), | ||
| range(-5, 5), | ||
| range(-5, 5), | ||
| ('', 'a', '123', '1234', '12345', 'abc123'), |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| ('', 'a', '123', '1234', '12345', 'abc123'), | |
| ('', 'a', 'abc', 'abcde', 'abcdef'), |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
(cherry picked from commit ba14dfa) Co-authored-by: Bénédikt Tran <[email protected]>
(cherry picked from commit ba14dfa) Co-authored-by: Bénédikt Tran <[email protected]>
|
GH-125098 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-125099 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…125098) gh-123378: fix a crash in `UnicodeError.__str__` (GH-124935) (cherry picked from commit ba14dfa) Co-authored-by: Bénédikt Tran <[email protected]>
…125099) gh-123378: fix a crash in `UnicodeError.__str__` (GH-124935) (cherry picked from commit ba14dfa) Co-authored-by: Bénédikt Tran <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.