diff options
author | Barry Warsaw <barry@python.org> | 2003-03-10 16:59:34 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2003-03-10 16:59:34 (GMT) |
commit | e1ff4bbce60488b2a518ee11e0b47347487381bb (patch) | |
tree | 051251bdb2297de1b21dc1625f820d79a2cb5850 /Lib/email | |
parent | 20ebc37013af02f566d2e1096bd97c43e8ebb257 (diff) | |
download | cpython-e1ff4bbce60488b2a518ee11e0b47347487381bb.zip cpython-e1ff4bbce60488b2a518ee11e0b47347487381bb.tar.gz cpython-e1ff4bbce60488b2a518ee11e0b47347487381bb.tar.bz2 |
Use ndiffAssertEqual in a couple of places for better error reporting.
Diffstat (limited to 'Lib/email')
-rw-r--r-- | Lib/email/test/test_email.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index 1df9b09..c307888 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -1089,6 +1089,7 @@ From: bperson@dom.ain ''') def test_one_part_in_a_multipart(self): + eq = self.ndiffAssertEqual outer = MIMEBase('multipart', 'mixed') outer['Subject'] = 'A subject' outer['To'] = 'aperson@dom.ain' @@ -1098,7 +1099,7 @@ From: bperson@dom.ain outer.set_boundary('BOUNDARY') msg = MIMEText('hello world') outer.attach(msg) - self.assertEqual(outer.as_string(), '''\ + eq(outer.as_string(), '''\ Content-Type: multipart/mixed; boundary="BOUNDARY" MIME-Version: 1.0 Subject: A subject @@ -1116,6 +1117,7 @@ hello world ''') def test_seq_parts_in_a_multipart(self): + eq = self.ndiffAssertEqual outer = MIMEBase('multipart', 'mixed') outer['Subject'] = 'A subject' outer['To'] = 'aperson@dom.ain' @@ -1125,7 +1127,7 @@ hello world msg = MIMEText('hello world') outer.attach(msg) outer.set_boundary('BOUNDARY') - self.assertEqual(outer.as_string(), '''\ + eq(outer.as_string(), '''\ Content-Type: multipart/mixed; boundary="BOUNDARY" MIME-Version: 1.0 Subject: A subject @@ -1410,6 +1412,7 @@ Your message cannot be delivered to the following recipients: '<002001c144a6$8752e060$56104586@oxy.edu>') def test_epilogue(self): + eq = self.ndiffAssertEqual fp = openfile('msg_21.txt') try: text = fp.read() @@ -1429,7 +1432,7 @@ Your message cannot be delivered to the following recipients: sfp = StringIO() g = Generator(sfp) g.flatten(msg) - self.assertEqual(sfp.getvalue(), text) + eq(sfp.getvalue(), text) def test_no_nl_preamble(self): eq = self.ndiffAssertEqual |