diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-23 15:49:31 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-23 15:49:31 (GMT) |
commit | 8966759b031ce9977e038c5db1d8ed47c6c827a6 (patch) | |
tree | ea99d8ff1d15c264e4891df32ab6d707098ad201 /Lib/test/test_plistlib.py | |
parent | 64a12072801d0acb97bc259cf3db294771366d1c (diff) | |
download | cpython-8966759b031ce9977e038c5db1d8ed47c6c827a6.zip cpython-8966759b031ce9977e038c5db1d8ed47c6c827a6.tar.gz cpython-8966759b031ce9977e038c5db1d8ed47c6c827a6.tar.bz2 |
Issue #21888: plistlib's load() and loads() now work if the fmt parameter is
specified.
Diffstat (limited to 'Lib/test/test_plistlib.py')
-rw-r--r-- | Lib/test/test_plistlib.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_plistlib.py b/Lib/test/test_plistlib.py index dc2fdf6..fef9f39 100644 --- a/Lib/test/test_plistlib.py +++ b/Lib/test/test_plistlib.py @@ -207,6 +207,9 @@ class TestPlistlib(unittest.TestCase): for fmt in ALL_FORMATS: with self.subTest(fmt=fmt): pl = self._create(fmt=fmt) + pl2 = plistlib.loads(TESTDATA[fmt], fmt=fmt) + self.assertEqual(dict(pl), dict(pl2), + "generated data was not identical to Apple's output") pl2 = plistlib.loads(TESTDATA[fmt]) self.assertEqual(dict(pl), dict(pl2), "generated data was not identical to Apple's output") @@ -217,6 +220,8 @@ class TestPlistlib(unittest.TestCase): b = BytesIO() pl = self._create(fmt=fmt) plistlib.dump(pl, b, fmt=fmt) + pl2 = plistlib.load(BytesIO(b.getvalue()), fmt=fmt) + self.assertEqual(dict(pl), dict(pl2)) pl2 = plistlib.load(BytesIO(b.getvalue())) self.assertEqual(dict(pl), dict(pl2)) |