[Python-3000-checkins] r66472 - in python/branches/py3k/Lib/test: test_os.py test_tempfile.py

antoine.pitrou python-3000-checkins at python.org
Tue Sep 16 01:54:52 CEST 2008


Author: antoine.pitrou
Date: Tue Sep 16 01:54:52 2008
New Revision: 66472

Log:
Fix Windows buildbot failures after r66469.



Modified:
   python/branches/py3k/Lib/test/test_os.py
   python/branches/py3k/Lib/test/test_tempfile.py

Modified: python/branches/py3k/Lib/test/test_os.py
==============================================================================
--- python/branches/py3k/Lib/test/test_os.py	(original)
+++ python/branches/py3k/Lib/test/test_os.py	Tue Sep 16 01:54:52 2008
@@ -69,7 +69,8 @@
         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):

Modified: python/branches/py3k/Lib/test/test_tempfile.py
==============================================================================
--- python/branches/py3k/Lib/test/test_tempfile.py	(original)
+++ python/branches/py3k/Lib/test/test_tempfile.py	Tue Sep 16 01:54:52 2008
@@ -314,7 +314,7 @@
         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)


More information about the Python-3000-checkins mailing list