[Python-checkins] python/dist/src/Lib/email/test test_email.py,1.39,1.40

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Mon, 10 Mar 2003 08:59:37 -0800


Update of /cvsroot/python/python/dist/src/Lib/email/test
In directory sc8-pr-cvs1:/tmp/cvs-serv11022

Modified Files:
	test_email.py 
Log Message:
Use ndiffAssertEqual in a couple of places for better error reporting.


Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** test_email.py	10 Mar 2003 16:09:51 -0000	1.39
--- test_email.py	10 Mar 2003 16:59:34 -0000	1.40
***************
*** 1090,1093 ****
--- 1090,1094 ----
  
      def test_one_part_in_a_multipart(self):
+         eq = self.ndiffAssertEqual
          outer = MIMEBase('multipart', 'mixed')
          outer['Subject'] = 'A subject'
***************
*** 1099,1103 ****
          msg = MIMEText('hello world')
          outer.attach(msg)
!         self.assertEqual(outer.as_string(), '''\
  Content-Type: multipart/mixed; boundary="BOUNDARY"
  MIME-Version: 1.0
--- 1100,1104 ----
          msg = MIMEText('hello world')
          outer.attach(msg)
!         eq(outer.as_string(), '''\
  Content-Type: multipart/mixed; boundary="BOUNDARY"
  MIME-Version: 1.0
***************
*** 1117,1120 ****
--- 1118,1122 ----
  
      def test_seq_parts_in_a_multipart(self):
+         eq = self.ndiffAssertEqual
          outer = MIMEBase('multipart', 'mixed')
          outer['Subject'] = 'A subject'
***************
*** 1126,1130 ****
          outer.attach(msg)
          outer.set_boundary('BOUNDARY')
!         self.assertEqual(outer.as_string(), '''\
  Content-Type: multipart/mixed; boundary="BOUNDARY"
  MIME-Version: 1.0
--- 1128,1132 ----
          outer.attach(msg)
          outer.set_boundary('BOUNDARY')
!         eq(outer.as_string(), '''\
  Content-Type: multipart/mixed; boundary="BOUNDARY"
  MIME-Version: 1.0
***************
*** 1411,1414 ****
--- 1413,1417 ----
  
      def test_epilogue(self):
+         eq = self.ndiffAssertEqual
          fp = openfile('msg_21.txt')
          try:
***************
*** 1430,1434 ****
          g = Generator(sfp)
          g.flatten(msg)
!         self.assertEqual(sfp.getvalue(), text)
  
      def test_no_nl_preamble(self):
--- 1433,1437 ----
          g = Generator(sfp)
          g.flatten(msg)
!         eq(sfp.getvalue(), text)
  
      def test_no_nl_preamble(self):