summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-10-29 01:49:07 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-10-29 01:49:07 (GMT)
commitea0e3b0d60b075e6d5cb09dcd83fd86e828612cb (patch)
tree4a8d50b06b8296e6dc9175e7ada7bfe4bb616a9a /Lib
parenta7d44001b1f4c3a61c8c96e805034653e268122d (diff)
downloadcpython-ea0e3b0d60b075e6d5cb09dcd83fd86e828612cb.zip
cpython-ea0e3b0d60b075e6d5cb09dcd83fd86e828612cb.tar.gz
cpython-ea0e3b0d60b075e6d5cb09dcd83fd86e828612cb.tar.bz2
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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_pep263.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_pep263.py b/Lib/test/test_pep263.py
index b7bb5a2..e4faa9f 100644
--- a/Lib/test/test_pep263.py
+++ b/Lib/test/test_pep263.py
@@ -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)