[Python-checkins] python/dist/src/Lib/test test_gzip.py,1.8,1.9
montanaro@sourceforge.net
montanaro@sourceforge.net
Wed, 22 May 2002 18:43:07 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv15685/test
Modified Files:
test_gzip.py
Log Message:
force gzip module to open files using 'b'inary mode.
closes patch #536278.
Index: test_gzip.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_gzip.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** test_gzip.py 9 Aug 2001 21:40:30 -0000 1.8
--- test_gzip.py 23 May 2002 01:43:05 -0000 1.9
***************
*** 19,23 ****
f = gzip.GzipFile(filename, 'wb') ; f.write(data1 * 50) ; f.close()
! f = gzip.GzipFile(filename, 'rb') ; d = f.read() ; f.close()
verify(d == data1*50)
--- 19,23 ----
f = gzip.GzipFile(filename, 'wb') ; f.write(data1 * 50) ; f.close()
! f = gzip.GzipFile(filename, 'r') ; d = f.read() ; f.close()
verify(d == data1*50)
***************
*** 74,77 ****
--- 74,81 ----
f.seek(pos)
f.write('GZ\n')
+ f.close()
+
+ f = gzip.GzipFile(filename, 'r')
+ verify(f.myfileobj.mode == 'rb')
f.close()