diff options
author | Hynek Schlawack <hs@ox.cx> | 2012-05-29 10:04:54 (GMT) |
---|---|---|
committer | Hynek Schlawack <hs@ox.cx> | 2012-05-29 10:04:54 (GMT) |
commit | 52209d3a1eb03d5a9ef200ffe400c36d32d42ad1 (patch) | |
tree | ad485f302dd4f2919a60dd2dc2f31ecd34b2cddd /Lib/test | |
parent | 737b173355b0473d134b1715dd8b1695eb023d8b (diff) | |
download | cpython-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.py | 6 |
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 |