summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2003-01-02 22:48:36 (GMT)
committerBarry Warsaw <barry@python.org>2003-01-02 22:48:36 (GMT)
commit3d597812b655ffd437997f8e47080ed4225dbd86 (patch)
tree0ae7da4034e37383021f21d94f3bf38995c01aa0 /Lib/email
parentd5ac8d0b3990853d3dfaa6f7029c71dadeee10b1 (diff)
downloadcpython-3d597812b655ffd437997f8e47080ed4225dbd86.zip
cpython-3d597812b655ffd437997f8e47080ed4225dbd86.tar.gz
cpython-3d597812b655ffd437997f8e47080ed4225dbd86.tar.bz2
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.
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/test/test_email.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index 1c77819..59e6724 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2001,2002 Python Software Foundation
+# Copyright (C) 2001,2002,2003 Python Software Foundation
# email package unit tests
import sys
@@ -50,9 +50,9 @@ except NameError:
-def openfile(filename):
+def openfile(filename, mode='r'):
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
def test_crlf_separation(self):
eq = self.assertEqual
- fp = openfile('msg_26.txt')
+ fp = openfile('msg_26.txt', mode='rb')
try:
msg = Parser().parse(fp)
finally: