Kaydet (Commit) 3d597812 authored tarafından Barry Warsaw's avatar Barry Warsaw

Jack complained that on test_crlf_separation() was failing on MacOS9

because the test file, msg_26.txt which has \r\n line endings, was
getting munged by cvs, which knows to do line ending conversions for
text files.  But we want \r\n to be preserved on all platforms, so we
cvs admin'd the file to be -kb (binary), which means we have to open
the file in binary mode to preserve these line ends.  Hopefully this
will be the end of the thrashing on this issue (but probably not).

Test passes on *nix now, and Tim confirms it passes on Windows.  We'll
leave it to Jack to test MacOS.
üst d5ac8d0b
# Copyright (C) 2001,2002 Python Software Foundation # Copyright (C) 2001,2002,2003 Python Software Foundation
# email package unit tests # email package unit tests
import sys import sys
...@@ -50,9 +50,9 @@ except NameError: ...@@ -50,9 +50,9 @@ except NameError:
def openfile(filename): def openfile(filename, mode='r'):
path = os.path.join(os.path.dirname(landmark), 'data', filename) path = os.path.join(os.path.dirname(landmark), 'data', filename)
return open(path, 'r') return open(path, mode)
...@@ -1883,7 +1883,7 @@ Here's the message body ...@@ -1883,7 +1883,7 @@ Here's the message body
def test_crlf_separation(self): def test_crlf_separation(self):
eq = self.assertEqual eq = self.assertEqual
fp = openfile('msg_26.txt') fp = openfile('msg_26.txt', mode='rb')
try: try:
msg = Parser().parse(fp) msg = Parser().parse(fp)
finally: finally:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment