make FileIO.mode always include 'b'

#4386 Reviewed by Amaury
This commit is contained in:
Benjamin Peterson 2008-11-22 00:41:45 +00:00
parent 656aa28cd5
commit 44309e6b37
8 changed files with 24 additions and 16 deletions

View file

@ -49,7 +49,7 @@ class AutoFileTests(unittest.TestCase):
# verify expected attributes exist
f = self.f
self.assertEquals(f.mode, "w")
self.assertEquals(f.mode, "wb")
self.assertEquals(f.closed, False)
# verify the attributes are readonly
@ -159,7 +159,7 @@ class OtherFileTests(unittest.TestCase):
def testModeStrings(self):
# check invalid mode strings
for mode in ("", "aU", "wU+", "rb", "rt"):
for mode in ("", "aU", "wU+", "rw", "rt"):
try:
f = _fileio._FileIO(TESTFN, mode)
except ValueError: