コード例 #1
0
ファイル: test_jsonify.py プロジェクト: geodrca/tg2
def test_list_iter():
    d = list(range(3))
    encoded = jsonify.encode_iter(d)
    assert ''.join(jsonify.encode_iter(d)) == jsonify.encode(d)
コード例 #2
0
ファイル: test_jsonify.py プロジェクト: 984958198/tg2
def test_list_allowed_iter():
    lists_encoder = jsonify.JSONEncoder(allow_lists=True)
    d = list(range(3))
    encoded = jsonify.encode_iter(d, lists_encoder)
    assert ''.join(encoded) == '[0, 1, 2]'
コード例 #3
0
def test_list_allowed_iter():
    lists_encoder = jsonify.JSONEncoder(allow_lists=True)
    d = list(range(3))
    encoded = jsonify.encode_iter(d, lists_encoder)
    assert ''.join(encoded) == '[0, 1, 2]'
コード例 #4
0
ファイル: test_jsonify.py プロジェクト: 984958198/tg2
def test_list_iter():
    d = list(range(3))
    encoded = jsonify.encode_iter(d)
    assert ''.join(jsonify.encode_iter(d)) == jsonify.encode(d)