Commit 9e4dc911 authored by Walter Dörwald's avatar Walter Dörwald

Fix list_test.py::test_print(): Read and write the

file in text mode, so the file content comes back
as str not bytes.
parent 2565d90d
...@@ -53,10 +53,10 @@ class CommonTest(seq_tests.CommonTest): ...@@ -53,10 +53,10 @@ class CommonTest(seq_tests.CommonTest):
d.append(d) d.append(d)
d.append(400) d.append(400)
try: try:
fo = open(test_support.TESTFN, "wb") fo = open(test_support.TESTFN, "w", encoding="ascii")
fo.write(str(d)) fo.write(str(d))
fo.close() fo.close()
fo = open(test_support.TESTFN, "rb") fo = open(test_support.TESTFN, "r", encoding="ascii")
self.assertEqual(fo.read(), repr(d)) self.assertEqual(fo.read(), repr(d))
finally: finally:
fo.close() fo.close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment