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

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Sun, 05 Jan 2003 15:10:18 -0800


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

Modified Files:
      Tag: r23a1-branch
	test_email.py 
Log Message:
The attachment test needs to open the email message in binary (and on the Mac it will fail if this isn't done).

This doesn't feel to me like the right fix (I think the email package itself should be fixed) but at least this gets MacPython-OS9 2.3a1 out the door.

Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v
retrieving revision 1.28
retrieving revision 1.28.2.1
diff -C2 -d -r1.28 -r1.28.2.1
*** test_email.py	30 Dec 2002 19:14:38 -0000	1.28
--- test_email.py	5 Jan 2003 23:10:14 -0000	1.28.2.1
***************
*** 51,57 ****
  
  
! def openfile(filename):
      path = os.path.join(os.path.dirname(landmark), 'data', filename)
!     return open(path, 'r')
  
  
--- 51,57 ----
  
  
! def openfile(filename, mode='r'):
      path = os.path.join(os.path.dirname(landmark), 'data', filename)
!     return open(path, mode)
  
  
***************
*** 1884,1888 ****
      def test_crlf_separation(self):
          eq = self.assertEqual
!         fp = openfile('msg_26.txt')
          try:
              msg = Parser().parse(fp)
--- 1884,1888 ----
      def test_crlf_separation(self):
          eq = self.assertEqual
!         fp = openfile('msg_26.txt', 'rb')
          try:
              msg = Parser().parse(fp)