def test_get_fn_list(): fn_list = util.get_fn_list(Agent) assert 'reset' in fn_list assert 'act' in fn_list assert 'update' in fn_list
def extend_unity_brain(): '''Extend Unity BrainParameters class at runtime to add BrainExt methods''' ext_fn_list = util.get_fn_list(BrainExt) for fn in ext_fn_list: setattr(BrainParameters, fn, getattr(BrainExt, fn))