]> granicus.if.org Git - python/commitdiff
Fix test_deque.py: Read and write file in text mode,
authorWalter Dörwald <walter@livinglogic.de>
Thu, 7 Jun 2007 12:40:09 +0000 (12:40 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Thu, 7 Jun 2007 12:40:09 +0000 (12:40 +0000)
so that read() returns a unicode object, which can be
compared directly to the repr() result.

Lib/test/test_deque.py

index e2254d6e6c62d80592d564e9afd853dc523bffc6..63391af1ba1561bc2e95220ce1ddf606c9689095 100644 (file)
@@ -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()