Mailing List Archive

python/dist/src/Lib/email/test test_email.py,1.17.2.1,1.17.2.2 test_email_torture.py,1.4.2.1,1.4.2.2
Update of /cvsroot/python/python/dist/src/Lib/email/test
In directory usw-pr-cvs1:/tmp/cvs-serv19003/Lib/email/test

Modified Files:
Tag: release22-maint
test_email.py test_email_torture.py
Log Message:
openfile(): Go back to opening the files in text mode. This undoes
the change in revision 1.11 (test_email.py) in response to SF bug
#609988. We now think that was the wrong fix and that WinZip was the
real culprit there.

This and the Parser.py patch will be forward ported into Python 2.3
and email 2.5.


Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v
retrieving revision 1.17.2.1
retrieving revision 1.17.2.2
diff -C2 -d -r1.17.2.1 -r1.17.2.2
*** test_email.py 4 Oct 2002 17:40:57 -0000 1.17.2.1
--- test_email.py 7 Oct 2002 17:05:28 -0000 1.17.2.2
***************
*** 47,51 ****
def openfile(filename):
path = os.path.join(os.path.dirname(landmark), 'data', filename)
! return open(path, 'rb')


--- 47,51 ----
def openfile(filename):
path = os.path.join(os.path.dirname(landmark), 'data', filename)
! return open(path, 'r')



Index: test_email_torture.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email_torture.py,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -C2 -d -r1.4.2.1 -r1.4.2.2
*** test_email_torture.py 4 Oct 2002 17:40:57 -0000 1.4.2.1
--- test_email_torture.py 7 Oct 2002 17:05:28 -0000 1.4.2.2
***************
*** 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
--- 23,27 ----
from os.path import join, dirname, abspath
path = abspath(join(dirname(testfile), os.pardir, 'moredata', filename))
! return open(path, 'r')

# Prevent this test from running in the Python distro