diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index fe2d3263f5a..5c30e50a24d 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -213,7 +213,7 @@ class IOTest(unittest.TestCase): for bufsize in (0, 1, 100): f = None with open(test_support.TESTFN, "wb", bufsize) as f: - f.write("xxx") + f.write(b"xxx") self.assertEqual(f.closed, True) f = None try: