diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-11 21:31:25 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-11 21:31:25 +0000 |
commit | fd476467f44ad8652f638fefd31bd67cf6582b57 (patch) | |
tree | e65d8d25e4e36299731a647e082ebb286c600264 /Lib/test/test_coding.py | |
parent | 7632bd2ef892b9379878bf9edbe1e85a3abffe22 (diff) | |
download | cpython-fd476467f44ad8652f638fefd31bd67cf6582b57.tar.gz |
Fix problem when exec'ing a string with a coding
Diffstat (limited to 'Lib/test/test_coding.py')
-rw-r--r-- | Lib/test/test_coding.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_coding.py b/Lib/test/test_coding.py index e83015e543..62cf55555b 100644 --- a/Lib/test/test_coding.py +++ b/Lib/test/test_coding.py @@ -21,6 +21,11 @@ class CodingTest(unittest.TestCase): fp.close() self.assertRaises(SyntaxError, compile, text, filename, 'exec') + def test_exec_valid_coding(self): + d = {} + exec('# coding: cp949\na = 5\n', d) + self.assertEqual(d['a'], 5) + def test_main(): test.test_support.run_unittest(CodingTest) |