]> granicus.if.org Git - python/commitdiff
Pre-opened test file needs to be opened in binary mode.
authorR. David Murray <rdmurray@bitdance.com>
Thu, 7 May 2009 18:09:58 +0000 (18:09 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Thu, 7 May 2009 18:09:58 +0000 (18:09 +0000)
Lib/test/test_aifc.py

index 54694ea2d914e2bd8f6cf34ad7463130f1324b29..cbf00e9a74d7a70281df1d2b08767985572b1b3f 100644 (file)
@@ -94,7 +94,7 @@ class AIFCTest(unittest.TestCase):
     def test_close(self):
         class Wrapfile(object):
             def __init__(self, file):
-                self.file = open(file)
+                self.file = open(file, 'rb')
                 self.closed = False
             def close(self):
                 self.file.close()