mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Fix list_test.py::test_print(): Read and write the
file in text mode, so the file content comes back as str not bytes.
This commit is contained in:
parent
2565d90dd7
commit
9e4dc911ea
1 changed files with 2 additions and 2 deletions
|
|
@ -53,10 +53,10 @@ def test_print(self):
|
|||
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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue