diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-23 15:50:19 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-23 15:50:19 (GMT) |
commit | 37f50e0c6b53c3df194ba412f71719ac85b87b42 (patch) | |
tree | 3c67b657a084cbbf179190c5a4e905c7745c6a0f /Lib/test | |
parent | f1062762f2432f755dc596b24a37a1e613554469 (diff) | |
parent | 8966759b031ce9977e038c5db1d8ed47c6c827a6 (diff) | |
download | cpython-37f50e0c6b53c3df194ba412f71719ac85b87b42.zip cpython-37f50e0c6b53c3df194ba412f71719ac85b87b42.tar.gz cpython-37f50e0c6b53c3df194ba412f71719ac85b87b42.tar.bz2 |
Issue #21888: plistlib's load() and loads() now work if the fmt parameter is
specified.
Diffstat (limited to 'Lib/test')
-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)) |