summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2013-08-31 21:12:21 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2013-08-31 21:12:21 (GMT)
commit740d6b6f39b169fe8c1ba2322fbab270aae731ea (patch)
treea6d3c4acadf5ca39f509628ea7a8d7b2db212245 /Lib
parent31e4d325b61ed756c6fe86a77528a90f4a765d6b (diff)
downloadcpython-740d6b6f39b169fe8c1ba2322fbab270aae731ea.zip
cpython-740d6b6f39b169fe8c1ba2322fbab270aae731ea.tar.gz
cpython-740d6b6f39b169fe8c1ba2322fbab270aae731ea.tar.bz2
Issue #12037: Fix test_email for desktop Windows.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_email/test_email.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py
index e11194b..904c06a 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()