Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 740d6b6

Browse files
committed
Issue #12037: Fix test_email for desktop Windows.
1 parent 31e4d32 commit 740d6b6

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Lib/test/test_email/test_email.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ def test_message_rfc822_only(self):
180180

181181
def test_byte_message_rfc822_only(self):
182182
# Make sure new bytes header parser also passes this.
183-
with openfile('msg_46.txt', 'rb') as fp:
184-
msgdata = fp.read()
183+
with openfile('msg_46.txt') as fp:
184+
msgdata = fp.read().encode('ascii')
185185
parser = email.parser.BytesHeaderParser()
186186
msg = parser.parsebytes(msgdata)
187187
out = BytesIO()

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ IDLE
314314
Tests
315315
-----
316316

317+
- Issue #12037: Fix test_email for desktop Windows.
318+
317319
- Issue #15507: test_subprocess's test_send_signal could fail if the test
318320
runner were run in an environment where the process inherited an ignore
319321
setting for SIGINT. Restore the SIGINT handler to the desired

0 commit comments

Comments
 (0)