Lines Matching refs:pl2
95 pl2 = _test_pl(use_builtin_types=True)
96 assert pl == pl2
106 pl2 = plistlib.load(fp, use_builtin_types=use_builtin_types)
108 assert pl == pl2
142 pl2 = plistlib.loads(data)
143 assert isinstance(pl2, Integral)
144 assert pl == pl2
145 data2 = plistlib.dumps(pl2)
162 pl2 = plistlib.loads(data, use_builtin_types=use_builtin_types)
163 assert isinstance(pl2, DataClass)
164 assert pl2 == pl
165 data2 = plistlib.dumps(pl2, use_builtin_types=use_builtin_types)
181 pl2 = plistlib.loads(data, use_builtin_types=use_builtin_types)
182 assert isinstance(pl2, bytes if use_builtin_types else plistlib.Data)
183 assert pl2 == pl
184 data2 = plistlib.dumps(pl2, use_builtin_types=use_builtin_types)
191 pl2 = plistlib.loads(data, use_builtin_types=use_builtin_types)
192 assert isinstance(pl2, unicode) # it's always a <string>
193 assert pl2 == pl.decode()
226 pl2 = plistlib.loads(TESTDATA, use_builtin_types=use_builtin_types)
227 assert pl == pl2
233 pl2 = plistlib.loads(data, use_builtin_types=use_builtin_types)
234 data2 = plistlib.dumps(pl2, use_builtin_types=use_builtin_types)
242 pl2 = plistlib.load(
245 assert pl == pl2
258 pl2 = plistlib.load(
262 assert dict(pl) == dict(pl2)
264 assert list(pl2.keys()) == ["a", "b", "c"]
266 assert list(pl2.keys()) == ["b", "a", "c"]
277 pl2 = plistlib.loads(data, dict_type=collections.OrderedDict)
279 assert dict(pl) == dict(pl2)
281 assert list(pl2.keys()) == ["a", "b", "c"]
283 assert list(pl2.keys()) == ["b", "a", "c"]
302 pl2 = plistlib.loads(data)
303 assert pl2 == {"snake": "aWord"}
308 pl2 = plistlib.loads(fp.getvalue())
309 assert pl2 == {"snake": "aWord"}
316 pl2 = plistlib.loads(data)
317 assert pl2 == {"first": [1, 2], "second": [1, 2], "third": [3, 4]}
318 assert pl2["first"] is not pl2["second"]
325 pl2 = plistlib.loads(data)
326 assert pl2 == {"first": [1, 2], "second": [1, 2], "third": [3, 4]}
327 assert pl2["first"] is not pl2["second"]
334 pl2 = plistlib.loads(data)
335 assert pl2 == {"first": {"a": 1}, "second": {"a": 1}, "third": {"b": 2}}
336 assert pl2["first"] is not pl2["second"]
424 pl2 = plistlib.loads(data, use_builtin_types=use_builtin_types)
425 assert pl == pl2
431 pl2 = plistlib.fromtree(tree, use_builtin_types=use_builtin_types)
432 assert pl == pl2
476 pl2 = readPlist(path)
477 assert isinstance(pl2["someData"], plistlib.Data)
478 assert pl2 == pl
483 pl2 = readPlist(f)
484 assert isinstance(pl2["someData"], plistlib.Data)
485 assert pl2 == pl
490 pl2 = readPlistFromString(TESTDATA)
491 assert isinstance(pl2["someData"], plistlib.Data)
492 assert pl2 == pl
499 pl2 = plistlib.load(fp, use_builtin_types=False)
500 assert pl2 == pl_no_builtin_types
508 pl2 = plistlib.load(fp, use_builtin_types=False)
509 assert pl2 == pl_no_builtin_types
514 pl2 = plistlib.loads(data)
515 assert pl2 == pl_no_builtin_types
526 pl2 = plistlib.loads(data)
528 assert isinstance(pl2["someData"], expected)
529 assert pl2 == pl_no_builtin_types