Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_complex.py @ 42911:cb28e14ee808
Changes in anticipation of stricter str vs. bytes enforcement.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 27 Aug 2007 20:40:10 +0000 |
| parents | 62874b34d95d |
| children | 1f9eee08ab35 |
line wrap: on
line diff
--- a/Lib/test/test_complex.py Mon Aug 27 19:07:22 2007 +0000 +++ b/Lib/test/test_complex.py Mon Aug 27 20:40:10 2007 +0000 @@ -318,11 +318,11 @@ 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()
