summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-04-13 11:07:24 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-04-13 11:07:24 (GMT)
commit485fb56eb86a1fcd35fd3d0d37efb5ec514dba2b (patch)
treef6b23e9670e70af104a248010798942acdbc5c7b /Lib/test
parent36067606707844f7de076cf1846afb767b494d7e (diff)
downloadcpython-485fb56eb86a1fcd35fd3d0d37efb5ec514dba2b.zip
cpython-485fb56eb86a1fcd35fd3d0d37efb5ec514dba2b.tar.gz
cpython-485fb56eb86a1fcd35fd3d0d37efb5ec514dba2b.tar.bz2
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
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/pickletester.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index 79407a6..dd0ed15 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -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)