summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/test/test_email.py4
-rw-r--r--Lib/email/test/test_email_torture.py2
2 files changed, 3 insertions, 3 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:
diff --git a/Lib/email/test/test_email_torture.py b/Lib/email/test/test_email_torture.py
index 1bff09c..76d66a9 100644
--- a/Lib/email/test/test_email_torture.py
+++ b/Lib/email/test/test_email_torture.py
@@ -22,7 +22,7 @@ from email.Iterators import _structure
def openfile(filename):
from os.path import join, dirname, abspath
path = abspath(join(dirname(testfile), os.pardir, 'moredata', filename))
- return open(path)
+ return open(path, 'rb')
# Prevent this test from running in the Python distro
try: