summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorHynek Schlawack <hs@ox.cx>2012-05-29 10:04:54 (GMT)
committerHynek Schlawack <hs@ox.cx>2012-05-29 10:04:54 (GMT)
commit52209d3a1eb03d5a9ef200ffe400c36d32d42ad1 (patch)
treead485f302dd4f2919a60dd2dc2f31ecd34b2cddd /Lib/test
parent737b173355b0473d134b1715dd8b1695eb023d8b (diff)
downloadcpython-52209d3a1eb03d5a9ef200ffe400c36d32d42ad1.zip
cpython-52209d3a1eb03d5a9ef200ffe400c36d32d42ad1.tar.gz
cpython-52209d3a1eb03d5a9ef200ffe400c36d32d42ad1.tar.bz2
#14835: Make plistlib output empty arrays & dicts like OS X
Patch by Sidney San Martín.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_plistlib.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_plistlib.py b/Lib/test/test_plistlib.py
index 5f980d0..a9e343e 100644
--- a/Lib/test/test_plistlib.py
+++ b/Lib/test/test_plistlib.py
@@ -55,6 +55,10 @@ TESTDATA = b"""<?xml version="1.0" encoding="UTF-8"?>
</array>
<key>aString</key>
<string>Doodah</string>
+ <key>anEmptyDict</key>
+ <dict/>
+ <key>anEmptyList</key>
+ <array/>
<key>anInt</key>
<integer>728</integer>
<key>nestedData</key>
@@ -112,6 +116,8 @@ class TestPlistlib(unittest.TestCase):
someMoreData = plistlib.Data(b"<lots of binary gunk>\0\1\2\3" * 10),
nestedData = [plistlib.Data(b"<lots of binary gunk>\0\1\2\3" * 10)],
aDate = datetime.datetime(2004, 10, 26, 10, 33, 33),
+ anEmptyDict = dict(),
+ anEmptyList = list()
)
pl['\xc5benraa'] = "That was a unicode key."
return pl