]> granicus.if.org Git - python/commitdiff
The test opened the binary test data files in text mode! Fixed.
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 3 Aug 2001 13:04:03 +0000 (13:04 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 3 Aug 2001 13:04:03 +0000 (13:04 +0000)
Lib/test/test_uu.py

index 503976a0103f8f063828b1654ad37c216b34086f..8c324d187db15ae165dbf024abdb457de99b4d5a 100644 (file)
@@ -60,11 +60,11 @@ if verbose:
 tmpIn  = TESTFN + "i"
 tmpOut = TESTFN + "o"
 try:
-    fin = open(tmpIn, 'w')
+    fin = open(tmpIn, 'wb')
     fin.write(teststr)
     fin.close()
 
-    fin = open(tmpIn, 'r')
+    fin = open(tmpIn, 'rb')
     fout = open(tmpOut, 'w')
     uu.encode(fin, fout, tmpIn, mode=0644)
     fin.close()
@@ -79,7 +79,7 @@ try:
     if verbose:
         print '6. decode file-> file'
     uu.decode(tmpOut)
-    fin = open(tmpIn, 'r')
+    fin = open(tmpIn, 'rb')
     s = fin.read()
     fin.close()
     verify(s == teststr)