]> granicus.if.org Git - python/commitdiff
Make test_tmpfile() pass. (And hence test_os.py as a whole passes.)
authorGuido van Rossum <guido@python.org>
Wed, 13 Jun 2007 01:55:50 +0000 (01:55 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 13 Jun 2007 01:55:50 +0000 (01:55 +0000)
tmpfile() now is a binary file.

Lib/test/test_os.py

index 9673172ce6afd549712b362bfb609ae4ca7295ed..2ddda8ac3f820576d6f3095273caeeefe529b4b3 100644 (file)
@@ -61,10 +61,10 @@ class TemporaryFileTests(unittest.TestCase):
             return
         fp = os.tmpfile()
         fp.write("foobar")
-        fp.seek(0,0)
+        fp.seek(0)
         s = fp.read()
         fp.close()
-        self.assert_(s == "foobar")
+        self.assertEquals(s, b"foobar")
 
     def test_tmpnam(self):
         import sys