summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_multibytecodec.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_multibytecodec.py')
-rw-r--r--Lib/test/test_multibytecodec.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py
index 849573a..fe772e1 100644
--- a/Lib/test/test_multibytecodec.py
+++ b/Lib/test/test_multibytecodec.py
@@ -48,8 +48,8 @@ class Test_MultibyteCodec(unittest.TestCase):
def test_codingspec(self):
try:
for enc in ALL_CJKENCODINGS:
- print('# coding:', enc, file=io.open(TESTFN, 'w'))
- exec(open(TESTFN).read())
+ code = '# coding: {}\n'.format(enc)
+ exec(code)
finally:
support.unlink(TESTFN)