diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py index 518005aadaf..635c828d55e 100644 --- a/Lib/test/test_bz2.py +++ b/Lib/test/test_bz2.py @@ -243,7 +243,7 @@ class BZ2FileTest(BaseTest): self.createTempFile() bz2f = BZ2File(self.filename, "U") bz2f.close() - f = open(self.filename) + f = open(self.filename, "rb") f.seek(0, 2) self.assertEqual(f.tell(), len(self.DATA)) f.close()