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)