From: Jack Jansen Date: Fri, 3 Aug 2001 13:04:03 +0000 (+0000) Subject: The test opened the binary test data files in text mode! Fixed. X-Git-Tag: v2.2a3~853 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fffd7224dffd0a0dea0df3d47b821e7880aca695;p=thirdparty%2FPython%2Fcpython.git The test opened the binary test data files in text mode! Fixed. --- diff --git a/Lib/test/test_uu.py b/Lib/test/test_uu.py index 503976a0103f..8c324d187db1 100644 --- a/Lib/test/test_uu.py +++ b/Lib/test/test_uu.py @@ -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)