From: Terry Jan Reedy Date: Sat, 31 Aug 2013 21:12:21 +0000 (-0400) Subject: Issue #12037: Fix test_email for desktop Windows. X-Git-Tag: v3.4.0a2~64^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=740d6b6f39b169fe8c1ba2322fbab270aae731ea;p=python Issue #12037: Fix test_email for desktop Windows. --- diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py index e11194b5b8..904c06a18c 100644 --- a/Lib/test/test_email/test_email.py +++ b/Lib/test/test_email/test_email.py @@ -180,8 +180,8 @@ class TestMessageAPI(TestEmailBase): def test_byte_message_rfc822_only(self): # Make sure new bytes header parser also passes this. - with openfile('msg_46.txt', 'rb') as fp: - msgdata = fp.read() + with openfile('msg_46.txt') as fp: + msgdata = fp.read().encode('ascii') parser = email.parser.BytesHeaderParser() msg = parser.parsebytes(msgdata) out = BytesIO() diff --git a/Misc/NEWS b/Misc/NEWS index 8f2b66e411..3961ef99f6 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -314,6 +314,8 @@ IDLE Tests ----- +- Issue #12037: Fix test_email for desktop Windows. + - Issue #15507: test_subprocess's test_send_signal could fail if the test runner were run in an environment where the process inherited an ignore setting for SIGINT. Restore the SIGINT handler to the desired