diff options
Diffstat (limited to 'Lib/test/test_complex.py')
-rw-r--r-- | Lib/test/test_complex.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_complex.py b/Lib/test/test_complex.py index 116ce54b28..b4082d94e6 100644 --- a/Lib/test/test_complex.py +++ b/Lib/test/test_complex.py @@ -318,11 +318,11 @@ class ComplexTest(unittest.TestCase): fo = None try: - fo = open(test_support.TESTFN, "wb") + fo = open(test_support.TESTFN, "w") print(a, b, file=fo) fo.close() - fo = open(test_support.TESTFN, "rb") - self.assertEqual(fo.read(), ("%s %s\n" % (a, b)).encode("ascii")) + fo = open(test_support.TESTFN, "r") + self.assertEqual(fo.read(), ("%s %s\n" % (a, b))) finally: if (fo is not None) and (not fo.closed): fo.close() |