Exemplo n.º 1
0
def test_serialize_deserialize():
    """
    test to_dict function for Ice object
    create a new ice object and make sure it has same properties
    """

    ice_grid = IceWindMover(ice_file, topology_file)
    serial = ice_grid.serialize()
    ice2 = IceWindMover.deserialize(serial)
    assert ice_grid == ice2
Exemplo n.º 2
0
def test_serialize_deserialize():
    """
    test to_dict function for Ice object
    create a new ice object and make sure it has same properties
    """

    ice_grid = IceWindMover(ice_file, topology_file)
    serial = ice_grid.serialize()
    ice2 = IceWindMover.deserialize(serial)
    assert ice_grid == ice2
Exemplo n.º 3
0
def test_serialize_deserialize():
    """
    test to_dict function for Ice object
    create a new ice object and make sure it has same properties
    """

    ice_grid = IceWindMover(ice_file, topology_file)
    serial = ice_grid.serialize('webapi')
    dict_ = IceWindMover.deserialize(serial)
    ice2 = IceWindMover.new_from_dict(dict_)
    assert ice_grid == ice2

    ice_grid.update_from_dict(dict_)  # tests no failures
Exemplo n.º 4
0
def test_serialize_deserialize():
    """
    test to_dict function for Ice object
    create a new ice object and make sure it has same properties
    """

    ice_grid = IceWindMover(ice_file, topology_file)
    serial = ice_grid.serialize('webapi')
    dict_ = IceWindMover.deserialize(serial)
    ice2 = IceWindMover.new_from_dict(dict_)
    assert ice_grid == ice2

    ice_grid.update_from_dict(dict_)  # tests no failures