summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bz2.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-06-30 16:25:07 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-06-30 16:25:07 (GMT)
commit938f635acb65873a55adeae8f1e5351b3ac5ea74 (patch)
tree2fbd1550aff1511ddb31003504ab924d69bec87a /Lib/test/test_bz2.py
parent2f655b73e4903a218e09cb4c58f7a2b8a706582a (diff)
downloadcpython-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.
Diffstat (limited to 'Lib/test/test_bz2.py')
-rw-r--r--Lib/test/test_bz2.py2
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())