do a backport of r75928

The added test does not fail without the patch, but we still fix the issue of
surrogates being used in wide builds where they should not be.
This commit is contained in:
Benjamin Peterson 2009-10-29 01:49:07 +00:00
parent a7d44001b1
commit ea0e3b0d60
2 changed files with 19 additions and 9 deletions

View file

@ -23,6 +23,13 @@ class PEP263Test(unittest.TestCase):
self.assertEqual(d['u'], u'\xf3')
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']))
def test_main():
test_support.run_unittest(PEP263Test)