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 = IceMover(ice_file, topology_file)
    serial = ice_grid.serialize('webapi')
    dict_ = IceMover.deserialize(serial)
    ice2 = IceMover.new_from_dict(dict_)
    assert ice_grid == ice2

    ice_grid.update_from_dict(dict_)  # tests no failures
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 = IceMover(ice_file, topology_file)
    serial = ice_grid.serialize('webapi')
    dict_ = IceMover.deserialize(serial)
    ice2 = IceMover.new_from_dict(dict_)
    assert ice_grid == ice2

    ice_grid.update_from_dict(dict_)  # tests no failures