Fix Windows buildbot failures after r66469.

This commit is contained in:
Antoine Pitrou 2008-09-15 23:54:52 +00:00
parent 9cadb1b6e0
commit d62269f920
2 changed files with 3 additions and 2 deletions

View 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):

View 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)