Lines Matching refs:pl
41 pl = dict(
64 pl["\xc5benraa"] = "That was a unicode key."
65 return pl
69 def pl(): function
94 pl = _test_pl(use_builtin_types=False)
96 assert pl == pl2
100 pl, use_builtin_types = parametrized_pl
103 plistlib.dump(pl, fp, use_builtin_types=use_builtin_types)
108 assert pl == pl2
111 plistlib.dump(pl, "filename")
118 pl = [object()]
121 plistlib.dumps(pl)
140 def test_int(pl): argument
141 data = plistlib.dumps(pl)
144 assert pl == pl2
152 def test_int_overflow(pl): argument
154 plistlib.dumps(pl)
159 pl = DataClass(b"<binary gunk\0\1\2\3>")
160 array = bytearray(pl) if use_builtin_types else bytearray(pl.data)
164 assert pl2 == pl
179 pl = DataClass(b"<binary gunk\0\1\2\3>")
180 data = plistlib.dumps(pl, use_builtin_types=use_builtin_types)
183 assert pl2 == pl
189 pl = b"some ASCII bytes"
190 data = plistlib.dumps(pl, use_builtin_types=False)
193 assert pl2 == pl.decode()
218 pl, use_builtin_types = parametrized_pl
219 pl = plistlib.loads(TESTDATA, use_builtin_types=use_builtin_types)
220 data = plistlib.dumps(pl, use_builtin_types=use_builtin_types)
225 pl, use_builtin_types = parametrized_pl
227 assert pl == pl2
231 pl = plistlib.loads(TESTDATA, use_builtin_types=use_builtin_types)
232 data = plistlib.dumps(pl, use_builtin_types=use_builtin_types)
239 pl, use_builtin_types = parametrized_pl
241 plistlib.dump(pl, b, use_builtin_types=use_builtin_types)
245 assert pl == pl2
250 pl = collections.OrderedDict()
251 pl["b"] = 1
252 pl["a"] = 2
253 pl["c"] = 3
257 plistlib.dump(pl, b, sort_keys=sort_keys)
262 assert dict(pl) == dict(pl2)
271 pl = collections.OrderedDict()
272 pl["b"] = 1
273 pl["a"] = 2
274 pl["c"] = 3
276 data = plistlib.dumps(pl, sort_keys=sort_keys)
279 assert dict(pl) == dict(pl2)
287 pl = {42: "aNumber"}
290 plistlib.dumps(pl)
294 plistlib.dump(pl, b)
298 pl = {42: "aNumber", "snake": "aWord"}
300 data = plistlib.dumps(pl, skipkeys=True, sort_keys=False)
306 plistlib.dump(pl, fp, skipkeys=True, sort_keys=False)
313 pl = {"first": (1, 2), "second": (1, 2), "third": (3, 4)}
315 data = plistlib.dumps(pl)
322 pl = {"first": [1, 2], "second": [1, 2], "third": [3, 4]}
324 data = plistlib.dumps(pl)
331 pl = {"first": {"a": 1}, "second": {"a": 1}, "third": {"b": 2}}
333 data = plistlib.dumps(pl)
357 pl = {"python": "\U0001f40d"}
358 data = plistlib.dumps(pl)
359 assert plistlib.loads(data) == pl
421 pl, use_builtin_types = parametrized_pl
425 assert pl == pl2
429 pl, use_builtin_types = parametrized_pl
432 assert pl == pl2
444 pl, use_builtin_types = parametrized_pl
446 tree2 = plistlib.totree(pl, use_builtin_types=use_builtin_types)
474 def test_readPlist_from_path(pl): argument
478 assert pl2 == pl
481 def test_readPlist_from_file(pl): argument
485 assert pl2 == pl
489 def test_readPlistFromString(pl): argument
492 assert pl2 == pl
519 pl = plistlib.loads(TESTDATA)
521 assert isinstance(pl["someData"], expected)