Exemplo n.º 1
0
def test_unions_of_nested_tables(inst):
    assert inst == model_from_bytes(inst.__class__, model_to_bytes(inst))
Exemplo n.º 2
0
def test_all_scalars_with_defaults(inst, builders):
    cbuilder, builder = builders

    assert model_to_bytes(inst, cbuilder) == model_to_bytes(inst, builder)
Exemplo n.º 3
0
def test_just_an_optional_string_rt(inst):
    # Remove then we update Flatbuffers.
    if not inst.id:
        inst.id = None
    assert inst == model_from_bytes(inst.__class__, model_to_bytes(inst))
Exemplo n.º 4
0
def test_just_a_double_rt(inst):
    assert inst == model_from_bytes(inst.__class__, model_to_bytes(inst))
Exemplo n.º 5
0
def test_seq_vectors_of_common1s_rt(inst):
    assert inst == model_from_bytes(inst.__class__, model_to_bytes(inst))
Exemplo n.º 6
0
def test_lists_of_strings_rt(inst):
    assert inst == model_from_bytes(inst.__class__, model_to_bytes(inst))
Exemplo n.º 7
0
def test_list_of_strings(inst, builders):
    cbuilder, builder = builders

    assert model_to_bytes(inst, cbuilder) == model_to_bytes(inst, builder)
Exemplo n.º 8
0
def test_contains_tables(inst):
    assert inst == model_from_bytes(inst.__class__, model_to_bytes(inst))
Exemplo n.º 9
0
def test_common1(inst):
    assert inst == model_from_bytes(inst.__class__, model_to_bytes(inst))
Exemplo n.º 10
0
def test_all_scalars_with_defaults(inst):
    assert inst == model_from_bytes(inst.__class__, model_to_bytes(inst))
Exemplo n.º 11
0
def test_optional_seq_vectors_of_strings(inst):
    assert inst == model_from_bytes(inst.__class__, model_to_bytes(inst))
Exemplo n.º 12
0
def test_seq_vectors_of_enums(inst):
    assert inst == model_from_bytes(inst.__class__, model_to_bytes(inst))
Exemplo n.º 13
0
def test_bytearray_tables(inst):
    assert inst == model_from_bytes(inst.__class__, model_to_bytes(inst))
Exemplo n.º 14
0
def test_vectors_of_scalars(inst, builders):
    cbuilder, builder = builders

    assert model_to_bytes(inst, cbuilder) == model_to_bytes(inst, builder)
Exemplo n.º 15
0
def test_just_a_doubles(inst, builders):
    cbuilder, builder = builders

    assert model_to_bytes(inst, cbuilder) == model_to_bytes(inst, builder)
Exemplo n.º 16
0
def test_vectors_of_common1s(inst, builders):
    cbuilder, builder = builders

    assert model_to_bytes(inst, cbuilder) == model_to_bytes(inst, builder)
Exemplo n.º 17
0
def test_just_a_simple_byte_enum_rt(inst):
    assert inst == model_from_bytes(inst.__class__, model_to_bytes(inst))
Exemplo n.º 18
0
def test_optional_tables(inst):
    assert inst == model_from_bytes(inst.__class__, model_to_bytes(inst))
Exemplo n.º 19
0
def test_optional_vectors_of_scalars_rt(inst):
    assert inst == model_from_bytes(inst.__class__, model_to_bytes(inst))