diff options
author | Walter Dörwald <walter@livinglogic.de> | 2007-05-24 17:44:33 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2007-05-24 17:44:33 (GMT) |
commit | 9e4dc911ea0d62b9d7a3b2e6151cc9568246adb7 (patch) | |
tree | f3887fa64bc81e1a009933a68f9794656dce726e /Lib/test/list_tests.py | |
parent | 2565d90dd746cfb6b68435bbb3c3e236d8e57197 (diff) | |
download | cpython-9e4dc911ea0d62b9d7a3b2e6151cc9568246adb7.zip cpython-9e4dc911ea0d62b9d7a3b2e6151cc9568246adb7.tar.gz cpython-9e4dc911ea0d62b9d7a3b2e6151cc9568246adb7.tar.bz2 |
Fix list_test.py::test_print(): Read and write the
file in text mode, so the file content comes back
as str not bytes.
Diffstat (limited to 'Lib/test/list_tests.py')
-rw-r--r-- | Lib/test/list_tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/list_tests.py b/Lib/test/list_tests.py index a5790c3..5162f2e 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() |