diff options
-rw-r--r-- | Lib/test/test_multibytecodec.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py index 276b9af..78326b5 100644 --- a/Lib/test/test_multibytecodec.py +++ b/Lib/test/test_multibytecodec.py @@ -6,7 +6,8 @@ from test import test_support from test import test_multibytecodec_support -import unittest, StringIO, codecs, sys +from test.test_support import TESTFN +import unittest, StringIO, codecs, sys, os class Test_MultibyteCodec(unittest.TestCase): @@ -25,6 +26,13 @@ class Test_MultibyteCodec(unittest.TestCase): self.assertRaises(IndexError, dec, 'apple\x92ham\x93spam', 'test.cjktest') + def test_codingspec(self): + print >> open(TESTFN, 'w'), '# coding: euc-kr' + try: + exec open(TESTFN) + finally: + os.unlink(TESTFN) + class Test_IncrementalEncoder(unittest.TestCase): def test_stateless(self): |