gh-126332: Add tests for _pyrepl.utils#129325
Conversation
Lib/test/test_pyrepl/test_utils.py
Outdated
|
|
||
| self.assertEqual(wlen('hello'), 5) | ||
| self.assertEqual(wlen('hello'+'\x1a'), 7) | ||
| self.assertEqual(wlen('hello'+'\0x1B'), 9) |
There was a problem hiding this comment.
This test is strange. Are you testing the nul byte and then the string x1B on purpose?
There was a problem hiding this comment.
Good catch. I tried to create a special unicode character to hit one of the paths in wlen, but think I made a typo. I removed this test and added two others.
|
The Docs CI job fails, I'm not sure why. So I updated the branch to try to fix the issue. |
|
Thanks @eendebakpt for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
(cherry picked from commit 0c4248f) Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
|
GH-130414 is a backport of this pull request to the 3.13 branch. |
Add unit tests for methods
'wlenandstr_widthfrom_pyrepl.utils.