コード例 #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()
    ice2 = IceMover.deserialize(serial)
    assert ice_grid == ice2
コード例 #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()
    ice2 = IceMover.deserialize(serial)
    assert ice_grid == ice2
コード例 #3
0
ファイル: test_ice_mover.py プロジェクト: satcomlabs/PyGnome
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
コード例 #4
0
ファイル: test_ice_mover.py プロジェクト: liuy0813/PyGnome
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