Fix file test.

This commit is contained in:
Walter Dörwald 2007-05-29 18:51:25 +00:00
parent 29478ef990
commit c02571484b
1 changed files with 1 additions and 1 deletions

View File

@ -327,7 +327,7 @@ class ComplexTest(unittest.TestCase):
print(a, b, file=fo) print(a, b, file=fo)
fo.close() fo.close()
fo = open(test_support.TESTFN, "rb") fo = open(test_support.TESTFN, "rb")
self.assertEqual(fo.read(), "%s %s\n" % (a, b)) self.assertEqual(fo.read(), bytes("%s %s\n" % (a, b)))
finally: finally:
if (fo is not None) and (not fo.closed): if (fo is not None) and (not fo.closed):
fo.close() fo.close()