コード例 #1
0
 def test_hash(self, move_size_definition, move_definition_dict,
               simulation):
     identical_definition = _MoveSizeTuneDefinition(**move_definition_dict)
     assert hash(identical_definition) == hash(move_size_definition)
     move_definition_dict['domain'] = (None, 5)
     different_definition = _MoveSizeTuneDefinition(**move_definition_dict)
     assert hash(different_definition) != hash(move_size_definition)
コード例 #2
0
 def test_eq(self, move_size_definition, move_definition_dict, simulation):
     identical_definition = _MoveSizeTuneDefinition(**move_definition_dict)
     assert identical_definition == move_size_definition
     move_definition_dict['domain'] = (None, 5)
     different_definition = _MoveSizeTuneDefinition(**move_definition_dict)
     assert different_definition != move_size_definition
コード例 #3
0
def move_size_definition(move_definition_dict):
    return _MoveSizeTuneDefinition(**move_definition_dict)