From 9e4dc911ea0d62b9d7a3b2e6151cc9568246adb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walter=20D=C3=B6rwald?= Date: Thu, 24 May 2007 17:44:33 +0000 Subject: [PATCH] Fix list_test.py::test_print(): Read and write the file in text mode, so the file content comes back as str not bytes. --- Lib/test/list_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/list_tests.py b/Lib/test/list_tests.py index a5790c3c9f7..5162f2ebaf8 100644 --- a/Lib/test/list_tests.py +++ b/Lib/test/list_tests.py @@ -53,10 +53,10 @@ class CommonTest(seq_tests.CommonTest): d.append(d) d.append(400) try: - fo = open(test_support.TESTFN, "wb") + fo = open(test_support.TESTFN, "w", encoding="ascii") fo.write(str(d)) fo.close() - fo = open(test_support.TESTFN, "rb") + fo = open(test_support.TESTFN, "r", encoding="ascii") self.assertEqual(fo.read(), repr(d)) finally: fo.close()