Skip to content

Commit 8692456

Browse files
bhuvi27cursoragent
andcommitted
gh-150771: Add bytes(m) assertions for shift_jis and euc-jp tests
Mirror test_set_text_charset_cp949 per review feedback. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent e2f3984 commit 8692456

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Lib/test/test_email/test_contentmanager.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,12 @@ def test_set_text_charset_shift_jis(self):
375375
376376
\x1b$BF|K\\8l\x1b(B
377377
"""))
378+
self.assertEqual(bytes(m), textwrap.dedent("""\
379+
Content-Type: text/plain; charset="iso-2022-jp"
380+
Content-Transfer-Encoding: 7bit
381+
382+
\x1b$BF|K\\8l\x1b(B
383+
""").encode('iso-2022-jp'))
378384

379385
def test_set_text_charset_euc_jp(self):
380386
m = self._make_message()
@@ -389,6 +395,12 @@ def test_set_text_charset_euc_jp(self):
389395
390396
\x1b$BF|K\\8l\x1b(B
391397
"""))
398+
self.assertEqual(bytes(m), textwrap.dedent("""\
399+
Content-Type: text/plain; charset="iso-2022-jp"
400+
Content-Transfer-Encoding: 7bit
401+
402+
\x1b$BF|K\\8l\x1b(B
403+
""").encode('iso-2022-jp'))
392404

393405
def test_set_text_plain_long_line_heuristics(self):
394406
m = self._make_message()

0 commit comments

Comments
 (0)