mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Fix test_deque.py: Read and write file in text mode,
so that read() returns a unicode object, which can be compared directly to the repr() result.
This commit is contained in:
parent
092a225a4d
commit
a92b446e7e
1 changed files with 2 additions and 2 deletions
|
@ -244,10 +244,10 @@ class TestBasic(unittest.TestCase):
|
|||
d = deque(range(200))
|
||||
d.append(d)
|
||||
try:
|
||||
fo = open(test_support.TESTFN, "wb")
|
||||
fo = open(test_support.TESTFN, "w")
|
||||
fo.write(str(d))
|
||||
fo.close()
|
||||
fo = open(test_support.TESTFN, "rb")
|
||||
fo = open(test_support.TESTFN, "r")
|
||||
self.assertEqual(fo.read(), repr(d))
|
||||
finally:
|
||||
fo.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue