def test_dict(d): assert decode(encode(d)) == d
def test_list(l): assert decode(encode(l)) == l
def test_bytestring(s): assert decode(encode(s)) == s
def test_integer(i): assert decode(encode(i)) == i
def test_string(s): assert decode(encode(s)) == bytes(s, 'utf-8')