summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_plistlib.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-10-04 17:08:29 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-10-04 17:08:29 (GMT)
commitdb8d6265fa86a7cb9d7c5e4d60e3b342edc90176 (patch)
tree08a881907b27ab5cfe8ffc3a6e4e84a797bb338f /Lib/test/test_plistlib.py
parent27b40981f7529f2be8031fe4cfd5e5391f789743 (diff)
parent7338ebc4ba00366fa2c4f592630c2acd98c178d8 (diff)
downloadcpython-db8d6265fa86a7cb9d7c5e4d60e3b342edc90176.zip
cpython-db8d6265fa86a7cb9d7c5e4d60e3b342edc90176.tar.gz
cpython-db8d6265fa86a7cb9d7c5e4d60e3b342edc90176.tar.bz2
Issue #28321: Fixed writing non-BMP characters with binary format in plistlib.
Diffstat (limited to 'Lib/test/test_plistlib.py')
-rw-r--r--Lib/test/test_plistlib.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_plistlib.py b/Lib/test/test_plistlib.py
index 60ff918..c77a6bf 100644
--- a/Lib/test/test_plistlib.py
+++ b/Lib/test/test_plistlib.py
@@ -360,6 +360,13 @@ class TestPlistlib(unittest.TestCase):
plistlib.dumps,
testString)
+ def test_non_bmp_characters(self):
+ pl = {'python': '\U0001f40d'}
+ for fmt in ALL_FORMATS:
+ with self.subTest(fmt=fmt):
+ data = plistlib.dumps(pl, fmt=fmt)
+ self.assertEqual(plistlib.loads(data), pl)
+
def test_nondictroot(self):
for fmt in ALL_FORMATS:
with self.subTest(fmt=fmt):