summaryrefslogtreecommitdiffstats
path: root/Lib/email/test/test_email.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2002-09-18 22:17:57 (GMT)
committerBarry Warsaw <barry@python.org>2002-09-18 22:17:57 (GMT)
commit40363b63f02f43e3c9c7442e33e1cb0bf4c25774 (patch)
treea967c708b73895e091cd84eac1428e4f18ae7e3c /Lib/email/test/test_email.py
parentf027eac92ba4df82c288bcf60d1d3bc57dd65d39 (diff)
downloadcpython-40363b63f02f43e3c9c7442e33e1cb0bf4c25774.zip
cpython-40363b63f02f43e3c9c7442e33e1cb0bf4c25774.tar.gz
cpython-40363b63f02f43e3c9c7442e33e1cb0bf4c25774.tar.bz2
Open the test files in binary mode so the \r\n files won't cause
failures on Windows. Closes SF bug # 609988.
Diffstat (limited to 'Lib/email/test/test_email.py')
-rw-r--r--Lib/email/test/test_email.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index 95eb0e8..7df5fcc 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -46,7 +46,7 @@ warnings.filterwarnings('ignore', '', DeprecationWarning, __name__)
def openfile(filename):
path = os.path.join(os.path.dirname(landmark), 'data', filename)
- return open(path)
+ return open(path, 'rb')
@@ -743,7 +743,7 @@ Blah blah blah
class TestMIMEAudio(unittest.TestCase):
def setUp(self):
# In Python, audiotest.au lives in Lib/test not Lib/test/data
- fp = open(findfile('audiotest.au'))
+ fp = open(findfile('audiotest.au'), 'rb')
try:
self._audiodata = fp.read()
finally: