diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-06-30 16:25:07 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-06-30 16:25:07 (GMT) |
commit | 938f635acb65873a55adeae8f1e5351b3ac5ea74 (patch) | |
tree | 2fbd1550aff1511ddb31003504ab924d69bec87a | |
parent | 2f655b73e4903a218e09cb4c58f7a2b8a706582a (diff) | |
download | cpython-938f635acb65873a55adeae8f1e5351b3ac5ea74.zip cpython-938f635acb65873a55adeae8f1e5351b3ac5ea74.tar.gz cpython-938f635acb65873a55adeae8f1e5351b3ac5ea74.tar.bz2 |
Issue #12451: Open the test file in binary mode in test_bz2, the text file is
not needed.
-rw-r--r-- | Lib/test/test_bz2.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py index 75078be..5a7d342 100644 --- a/Lib/test/test_bz2.py +++ b/Lib/test/test_bz2.py @@ -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()) |