Issue #12451: Open the test file in binary mode in test_bz2, the text file is

not needed.
This commit is contained in:
Victor Stinner 2011-06-30 18:25:07 +02:00
parent 2f655b73e4
commit 938f635acb
1 changed files with 1 additions and 1 deletions

View File

@ -340,7 +340,7 @@ class BZ2FileTest(BaseTest):
def testFileno(self):
self.createTempFile()
with open(self.filename) as rawf:
with open(self.filename, 'rb') as rawf:
with BZ2File(fileobj=rawf) as bz2f:
self.assertEqual(bz2f.fileno(), rawf.fileno())