Commit 938f635a authored by Victor Stinner's avatar Victor Stinner

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

not needed.
parent 2f655b73
......@@ -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())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment