commit | 92f60ed82a302035009835a8d63ff714118a96ad | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Thu Oct 14 22:11:44 2010 +0000 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Thu Oct 14 22:11:44 2010 +0000 |
tree | a119000028c02ecf0317859d0bcda37fe4c505b4 | |
parent | 73315e92009c88acf53e497a0b9fcd93cd735aed [diff] [blame] |
More proper closing of files
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 @@ 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)