diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-10-29 01:22:38 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-10-29 01:22:38 (GMT) |
commit | 7dc5ac5ec690db232359620d28cf102c3b6a5165 (patch) | |
tree | b3a9f727da23adcd733325dd8296c5ba0b061303 /Lib | |
parent | 1531f528b3d89096817824d5c597ca873f59e822 (diff) | |
download | cpython-7dc5ac5ec690db232359620d28cf102c3b6a5165.zip cpython-7dc5ac5ec690db232359620d28cf102c3b6a5165.tar.gz cpython-7dc5ac5ec690db232359620d28cf102c3b6a5165.tar.bz2 |
Merged revisions 75928 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r75928 | benjamin.peterson | 2009-10-28 16:59:39 -0500 (Wed, 28 Oct 2009) | 5 lines
in wide builds, avoid storing high unicode characters from source code with surrogates
This is accomplished by decoding with utf-32 instead of utf-16 on all builds.
The patch is by Adam Olsen.
........
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_pep263.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_pep263.py b/Lib/test/test_pep263.py index 05ca47f..587b2fc 100644 --- a/Lib/test/test_pep263.py +++ b/Lib/test/test_pep263.py @@ -36,6 +36,14 @@ class PEP263Test(unittest.TestCase): exec(c, d) self.assertEquals(d['\xc6'], '\xc6') + def test_issue3297(self): + c = compile("a, b = '\U0001010F', '\\U0001010F'", "dummy", "exec") + d = {} + exec(c, d) + self.assertEqual(d['a'], d['b']) + self.assertEqual(len(d['a']), len(d['b'])) + self.assertEqual(ascii(d['a']), ascii(d['b'])) + def test_main(): support.run_unittest(PEP263Test) |