-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-126332: Add tests for _pyrepl.utils #129325
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is strange. Are you testing the nul byte and then the string x1B
on purpose?
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.
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.
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
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 <[email protected]>
GH-130414 is a backport of this pull request to the 3.13 branch. |
Add unit tests for methods
'wlen
andstr_width
from_pyrepl.utils
.