Fix file test.
This commit is contained in:
parent
29478ef990
commit
c02571484b
|
@ -327,7 +327,7 @@ class ComplexTest(unittest.TestCase):
|
|||
print(a, b, file=fo)
|
||||
fo.close()
|
||||
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:
|
||||
if (fo is not None) and (not fo.closed):
|
||||
fo.close()
|
||||
|
|
Loading…
Reference in New Issue