mirror of
https://github.com/python/cpython.git
synced 2024-12-15 04:44:47 +08:00
Issue #12037: Fix test_email for desktop Windows.
This commit is contained in:
commit
7e7cf8bc51
@ -180,8 +180,8 @@ class TestMessageAPI(TestEmailBase):
|
|||||||
|
|
||||||
def test_byte_message_rfc822_only(self):
|
def test_byte_message_rfc822_only(self):
|
||||||
# Make sure new bytes header parser also passes this.
|
# Make sure new bytes header parser also passes this.
|
||||||
with openfile('msg_46.txt', 'rb') as fp:
|
with openfile('msg_46.txt') as fp:
|
||||||
msgdata = fp.read()
|
msgdata = fp.read().encode('ascii')
|
||||||
parser = email.parser.BytesHeaderParser()
|
parser = email.parser.BytesHeaderParser()
|
||||||
msg = parser.parsebytes(msgdata)
|
msg = parser.parsebytes(msgdata)
|
||||||
out = BytesIO()
|
out = BytesIO()
|
||||||
@ -269,8 +269,8 @@ class TestMessageAPI(TestEmailBase):
|
|||||||
|
|
||||||
def test_as_bytes(self):
|
def test_as_bytes(self):
|
||||||
msg = self._msgobj('msg_01.txt')
|
msg = self._msgobj('msg_01.txt')
|
||||||
with openfile('msg_01.txt', 'rb') as fp:
|
with openfile('msg_01.txt') as fp:
|
||||||
data = fp.read()
|
data = fp.read().encode('ascii')
|
||||||
self.assertEqual(data, bytes(msg))
|
self.assertEqual(data, bytes(msg))
|
||||||
fullrepr = msg.as_bytes(unixfrom=True)
|
fullrepr = msg.as_bytes(unixfrom=True)
|
||||||
lines = fullrepr.split(b'\n')
|
lines = fullrepr.split(b'\n')
|
||||||
|
@ -165,6 +165,8 @@ Library
|
|||||||
Tests
|
Tests
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
- Issue #12037: Fix test_email for desktop Windows.
|
||||||
|
|
||||||
- Issue #15507: test_subprocess's test_send_signal could fail if the test
|
- 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
|
runner were run in an environment where the process inherited an ignore
|
||||||
setting for SIGINT. Restore the SIGINT handler to the desired
|
setting for SIGINT. Restore the SIGINT handler to the desired
|
||||||
|
Loading…
Reference in New Issue
Block a user