]> granicus.if.org Git - python/commitdiff
Issue #12037: Fix test_email for desktop Windows.
authorTerry Jan Reedy <tjreedy@udel.edu>
Sat, 31 Aug 2013 21:12:21 +0000 (17:12 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Sat, 31 Aug 2013 21:12:21 +0000 (17:12 -0400)
Lib/test/test_email/test_email.py
Misc/NEWS

index e11194b5b85246f1b0e641678bd80ec93c9af751..904c06a18c00f4337360180d56313fccb62fd43d 100644 (file)
@@ -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()
index 8f2b66e411a1f751c3b79b8c2ea9c744b24fcfc3..3961ef99f67d2177f670223333538fd075cf1427 100644 (file)
--- 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