[Python-checkins] python/dist/src/Lib/email/test test_email.py,1.10,1.11 test_email_torture.py,1.3,1.4

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Wed, 18 Sep 2002 15:17:59 -0700


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

Modified Files:
	test_email.py test_email_torture.py 
Log Message:
Open the test files in binary mode so the \r\n files won't cause
failures on Windows.  Closes SF bug # 609988.


Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** test_email.py	11 Sep 2002 02:31:24 -0000	1.10
--- test_email.py	18 Sep 2002 22:17:57 -0000	1.11
***************
*** 47,51 ****
  def openfile(filename):
      path = os.path.join(os.path.dirname(landmark), 'data', filename)
!     return open(path)
  
  
--- 47,51 ----
  def openfile(filename):
      path = os.path.join(os.path.dirname(landmark), 'data', filename)
!     return open(path, 'rb')
  
  
***************
*** 744,748 ****
      def setUp(self):
          # In Python, audiotest.au lives in Lib/test not Lib/test/data
!         fp = open(findfile('audiotest.au'))
          try:
              self._audiodata = fp.read()
--- 744,748 ----
      def setUp(self):
          # In Python, audiotest.au lives in Lib/test not Lib/test/data
!         fp = open(findfile('audiotest.au'), 'rb')
          try:
              self._audiodata = fp.read()

Index: test_email_torture.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email_torture.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_email_torture.py	6 Sep 2002 03:41:27 -0000	1.3
--- test_email_torture.py	18 Sep 2002 22:17:57 -0000	1.4
***************
*** 23,27 ****
      from os.path import join, dirname, abspath
      path = abspath(join(dirname(testfile), os.pardir, 'moredata', filename))
!     return open(path)
  
  # Prevent this test from running in the Python distro
--- 23,27 ----
      from os.path import join, dirname, abspath
      path = abspath(join(dirname(testfile), os.pardir, 'moredata', filename))
!     return open(path, 'rb')
  
  # Prevent this test from running in the Python distro