summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_multibytecodec.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-10-14 22:14:36 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-10-14 22:14:36 (GMT)
commitea5d827b729e425751428153318ecc348cc0be50 (patch)
tree1997afdc83eb0dca7c00c11a71419579e94b871a /Lib/test/test_multibytecodec.py
parent3d400b7a58a9f6e338048593ae19ab3cc92a8cd3 (diff)
downloadcpython-ea5d827b729e425751428153318ecc348cc0be50.zip
cpython-ea5d827b729e425751428153318ecc348cc0be50.tar.gz
cpython-ea5d827b729e425751428153318ecc348cc0be50.tar.bz2
Merged revisions 85503 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85503 | antoine.pitrou | 2010-10-15 00:11:44 +0200 (ven., 15 oct. 2010) | 2 lines More proper closing of files ........
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 b482b39..f3c8c61 100644
--- a/Lib/test/test_multibytecodec.py
+++ b/Lib/test/test_multibytecodec.py
@@ -49,8 +49,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)