diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-11-22 00:41:45 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-11-22 00:41:45 (GMT) |
commit | 44309e6b3768d6d559491ddf6ca56bfad2adb9b5 (patch) | |
tree | 5d71526f8d1b06a39c67191bf55e85e68c205c95 /Lib/test/test_io.py | |
parent | 656aa28cd50d00171d46df30eaeecd45eb0ae32c (diff) | |
download | cpython-44309e6b3768d6d559491ddf6ca56bfad2adb9b5.zip cpython-44309e6b3768d6d559491ddf6ca56bfad2adb9b5.tar.gz cpython-44309e6b3768d6d559491ddf6ca56bfad2adb9b5.tar.bz2 |
make FileIO.mode always include 'b'
#4386 Reviewed by Amaury
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r-- | Lib/test/test_io.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index 79cfd8a..58203ed 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -1266,7 +1266,7 @@ class MiscIOTest(unittest.TestCase): def test_attributes(self): f = io.open(support.TESTFN, "wb", buffering=0) - self.assertEquals(f.mode, "w") + self.assertEquals(f.mode, "wb") f.close() f = io.open(support.TESTFN, "U") @@ -1274,18 +1274,18 @@ class MiscIOTest(unittest.TestCase): self.assertEquals(f.buffer.name, support.TESTFN) self.assertEquals(f.buffer.raw.name, support.TESTFN) self.assertEquals(f.mode, "U") - self.assertEquals(f.buffer.mode, "r") - self.assertEquals(f.buffer.raw.mode, "r") + self.assertEquals(f.buffer.mode, "rb") + self.assertEquals(f.buffer.raw.mode, "rb") f.close() f = io.open(support.TESTFN, "w+") self.assertEquals(f.mode, "w+") - self.assertEquals(f.buffer.mode, "r+") # Does it really matter? - self.assertEquals(f.buffer.raw.mode, "r+") + self.assertEquals(f.buffer.mode, "rb+") # Does it really matter? + self.assertEquals(f.buffer.raw.mode, "rb+") g = io.open(f.fileno(), "wb", closefd=False) - self.assertEquals(g.mode, "w") - self.assertEquals(g.raw.mode, "w") + self.assertEquals(g.mode, "wb") + self.assertEquals(g.raw.mode, "wb") self.assertEquals(g.name, f.fileno()) self.assertEquals(g.raw.name, f.fileno()) f.close() |