summaryrefslogtreecommitdiffstats
path: root/Lib/email/test
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-02-09 22:36:02 (GMT)
committerGuido van Rossum <guido@python.org>2007-02-09 22:36:02 (GMT)
commit9b8850439cc39c72db3e0c3b1a7e9cf00c643b13 (patch)
tree85b58116dcca3de868be6ab9f67a927a9b32fb16 /Lib/email/test
parent8df511b5f69017e05eb0d7745bc76b95e6ec7d63 (diff)
downloadcpython-9b8850439cc39c72db3e0c3b1a7e9cf00c643b13.zip
cpython-9b8850439cc39c72db3e0c3b1a7e9cf00c643b13.tar.gz
cpython-9b8850439cc39c72db3e0c3b1a7e9cf00c643b13.tar.bz2
Fairly subtle fix for failing tests.
Diffstat (limited to 'Lib/email/test')
-rw-r--r--Lib/email/test/test_email.py7
-rw-r--r--Lib/email/test/test_email_renamed.py7
2 files changed, 6 insertions, 8 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index 0a25a67..c3269d7 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -54,10 +54,9 @@ class TestEmailBase(unittest.TestCase):
if first != second:
sfirst = str(first)
ssecond = str(second)
- diff = difflib.ndiff(sfirst.splitlines(), ssecond.splitlines())
- fp = StringIO()
- print(NL, NL.join(diff), file=fp)
- raise self.failureException, fp.getvalue()
+ diff = difflib.ndiff(sfirst.splitlines(True),
+ ssecond.splitlines(True))
+ raise self.failureException(NL + "".join(diff))
def _msgobj(self, filename):
fp = openfile(findfile(filename))
diff --git a/Lib/email/test/test_email_renamed.py b/Lib/email/test/test_email_renamed.py
index 532b146..21061b0 100644
--- a/Lib/email/test/test_email_renamed.py
+++ b/Lib/email/test/test_email_renamed.py
@@ -55,10 +55,9 @@ class TestEmailBase(unittest.TestCase):
if first != second:
sfirst = str(first)
ssecond = str(second)
- diff = difflib.ndiff(sfirst.splitlines(), ssecond.splitlines())
- fp = StringIO()
- print(NL, NL.join(diff), file=fp)
- raise self.failureException, fp.getvalue()
+ diff = difflib.ndiff(sfirst.splitlines(True),
+ ssecond.splitlines(True))
+ raise self.failureException(NL + "".join(diff))
def _msgobj(self, filename):
fp = openfile(findfile(filename))