summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_complex.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-27 20:40:10 (GMT)
committerGuido van Rossum <guido@python.org>2007-08-27 20:40:10 (GMT)
commit09549f44076e84083cbb15dbd6da9d1a3fd6d7f1 (patch)
tree311dfe57d4e326137b0435846cd07c3d717f26d0 /Lib/test/test_complex.py
parent739e2ad64bc2a5a345723a23ca01fa6b54ba1c9f (diff)
downloadcpython-09549f44076e84083cbb15dbd6da9d1a3fd6d7f1.zip
cpython-09549f44076e84083cbb15dbd6da9d1a3fd6d7f1.tar.gz
cpython-09549f44076e84083cbb15dbd6da9d1a3fd6d7f1.tar.bz2
Changes in anticipation of stricter str vs. bytes enforcement.
Diffstat (limited to 'Lib/test/test_complex.py')
-rw-r--r--Lib/test/test_complex.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_complex.py b/Lib/test/test_complex.py
index 116ce54..b4082d9 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()