8000 gh-110289: C API: Add PyUnicode_EqualToUTF8() function by serhiy-storchaka · Pull Request #110297 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-110289: C API: Add PyUnicode_EqualToUTF8() function #110297

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

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove redundant arguments.
  • Loading branch information
serhiy-storchaka committed Oct 7, 2023
commit be2ffe844a5f274168f2f7e554f8e1f745e83cb9
4 changes: 2 additions & 2 deletions Lib/test/test_capi/test_unicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -1372,8 +1372,8 @@ def test_equaltoutf8andsize(self):
self.assertEqual(equaltoutf8andsize(s2, b, len(b) - 1), 0)

# embedded null chars/bytes
self.assertEqual(equaltoutf8andsize('abc\0def', b'abc\0def', 7), 1)
self.assertEqual(equaltoutf8andsize('abc\0def\0', b'abc\0def\0', 8), 1)
self.assertEqual(equaltoutf8andsize('abc\0def', b'abc\0def'), 1)
self.assertEqual(equaltoutf8andsize('abc\0def\0', b'abc\0def\0'), 1)

# Surrogate characters are always treated as not equal
self.assertEqual(equaltoutf8andsize('\udcfe',
Expand Down
0