]> granicus.if.org Git - python/commitdiff
Fix Windows buildbot failures after r66469.
authorAntoine Pitrou <solipsis@pitrou.net>
Mon, 15 Sep 2008 23:54:52 +0000 (23:54 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Mon, 15 Sep 2008 23:54:52 +0000 (23:54 +0000)
Lib/test/test_os.py
Lib/test/test_tempfile.py

index f58aaf7911b46fdba08d026a8912f30a7c304372..4897aaf713a9bb90c0afea90cf2a1b28c380972c 100644 (file)
@@ -69,7 +69,8 @@ class FileTests(unittest.TestCase):
         os.write(fd, memoryview(b"spam\n"))
         os.close(fd)
         with open(support.TESTFN, "rb") as fobj:
-            self.assertEqual(fobj.read(), b"bacon\neggs\nspam\n")
+            self.assertEqual(fobj.read().splitlines(),
+                [b"bacon", b"eggs", b"spam"])
 
 
 class TemporaryFileTests(unittest.TestCase):
index 0e5cb0f2d1eb17f4e0cd1d6dbdbdca698be36d84..0ef0925ee0e4f4ef1470af0fc6fae22e4a46cdd8 100644 (file)
@@ -314,7 +314,7 @@ class test__mkstemp_inner(TC):
         if not has_textmode:
             return            # ugh, can't use TestSkipped.
 
-        self.do_create(bin=0).write("blat\n")
+        self.do_create(bin=0).write(b"blat\n")
         # XXX should test that the file really is a text file
 
 test_classes.append(test__mkstemp_inner)