make FileIO.mode always include 'b'
#4386 Reviewed by Amaury
diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py
index a11d3ba..80de93d 100644
--- a/Lib/test/test_fileio.py
+++ b/Lib/test/test_fileio.py
@@ -49,7 +49,7 @@
# 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 @@
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: