Merged revisions 80031 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r80031 | victor.stinner | 2010-04-13 13:07:24 +0200 (mar., 13 avril 2010) | 4 lines

  Issue #8383: pickle and pickletools use surrogatepass error handler when
  encoding unicode as utf8 to support lone surrogates and stay compatible with
  Python 2.x and 3.0
........
This commit is contained in:
Victor Stinner 2010-04-13 11:09:22 +00:00
parent 1bc6f6ea5e
commit f7351b40b5
5 changed files with 14 additions and 6 deletions

View file

@ -515,7 +515,9 @@ class AbstractPickleTests(unittest.TestCase):
def test_unicode(self):
endcases = ['', '<\\u>', '<\\\u1234>', '<\n>',
'<\\>', '<\\\U00012345>']
'<\\>', '<\\\U00012345>',
# surrogates
'<\udc80>']
for proto in protocols:
for u in endcases:
p = self.dumps(u, proto)