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

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Thu, 02 Jan 2003 14:48:39 -0800


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

Modified Files:
	test_email.py 
Log Message:
Jack complained that on test_crlf_separation() was failing on MacOS9
because the test file, msg_26.txt which has \r\n line endings, was
getting munged by cvs, which knows to do line ending conversions for
text files.  But we want \r\n to be preserved on all platforms, so we
cvs admin'd the file to be -kb (binary), which means we have to open
the file in binary mode to preserve these line ends.  Hopefully this
will be the end of the thrashing on this issue (but probably not).

Test passes on *nix now, and Tim confirms it passes on Windows.  We'll
leave it to Jack to test MacOS.


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.29
diff -C2 -d -r1.28 -r1.29
*** test_email.py	30 Dec 2002 19:14:38 -0000	1.28
--- test_email.py	2 Jan 2003 22:48:36 -0000	1.29
***************
*** 1,3 ****
! # Copyright (C) 2001,2002 Python Software Foundation
  # email package unit tests
  
--- 1,3 ----
! # Copyright (C) 2001,2002,2003 Python Software Foundation
  # email package unit tests
  
***************
*** 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', mode='rb')
          try:
              msg = Parser().parse(fp)