def test_binary(): data = '\xae\x9fg=\xe6\xaa?\x0bvS5\xfas\xea\x1c\xa7' blob = encode_bin(data) plist = nsplist.loads(blob) assert data == plist
def test_dict(): data = '{\n\t"x" = "0";\n\t"y" = "1";\n\t"z" = "2";\n\t"t" = "3";\n}' plist = nsplist.loads(data) assert plist['x'] == '0' assert plist['y'] == '1' assert plist['z'] == '2' assert plist['t'] == '3'
def test_list(): data = '("a", "b", c,)' plist = nsplist.loads(data) assert plist == ['a', 'b', 'c']