8000 bpo-46659: Update the test on the mbcs codec alias by vstinner · Pull Request #31168 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-46659: Update the test on the mbcs codec alias #31168

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 2 commits into from
Feb 6, 2022
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
Update test_codecs.test_basics()
  • Loading branch information
vstinner committed Feb 6, 2022
commit 6a4c88670b5a908a33253a24760c7ae96701de38
5 changes: 4 additions & 1 deletion Lib/test/test_codecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1904,7 +1904,10 @@ def test_basics(self):
name += "_codec"
elif encoding == "latin_1":
name = "latin_1"
self.assertEqual(encoding.replace("_", "-"), name.replace("_", "-"))
# Skip the mbcs alias on Windows
if name != "mbcs":
self.assertEqual(encoding.replace("_", "-"),
name.replace("_", "-"))

(b, size) = codecs.getencoder(encoding)(s)
self.assertEqual(size, len(s), "encoding=%r" % encoding)
Expand Down
0