Skip to content

Add yet one assertion in test_set_text_charset_cp949#151224

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:test_set_text_charset_cp949
Open

Add yet one assertion in test_set_text_charset_cp949#151224
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:test_set_text_charset_cp949

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

Check bytes(m), not only str(m).

@serhiy-storchaka serhiy-storchaka requested a review from a team as a code owner June 10, 2026 08:09
@serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir skip news needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jun 10, 2026
self.assertEqual(m.get_payload(decode=True).decode('ks_c_5601-1987'), content)
self.assertEqual(bytes(m), textwrap.dedent("""\
Content-Type: text/plain; charset="ks_c_5601-1987"
Content-Transfer-Encoding: 8bit

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit surprised that Content-Transfer-Encoding is 8bit instead of base64, like above. This I why I add this test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip issue skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant