mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
a7d44001b1
commit
ea0e3b0d60
2 changed files with 19 additions and 9 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue