def test_up_cast_out2(specialized_domain, general_domain, action):
    cast = autocast(func_out2, specialized_domain, general_domain)
    assert cast(action) == {'agent': [action]}
def test_up_cast_out1(specialized_domain, general_domain, state):
    cast = autocast(func_out1, specialized_domain, general_domain)
    assert cast(state) == Memory([state])
def test_down_cast_out2(general_domain, specialized_domain, action):
    cast = autocast(func_out2, general_domain, specialized_domain)
    assert cast({'agent': [action]}) == action
def test_down_cast_out1(general_domain, specialized_domain, state):
    cast = autocast(func_out1, general_domain, specialized_domain)
    assert cast(Memory([state])) == state
def test_up_cast_in(specialized_domain, general_domain, state, action):
    cast = autocast(func_in, specialized_domain, general_domain)
    assert cast(Memory([state]), {'agent': [action]}) == (state, action)
Esempio n. 6
0
def test_down_cast_in(general_domain, specialized_domain, state, action):
    cast = autocast(func_in, general_domain, specialized_domain)
    assert cast(state, action) == (Memory([state]), {"agent": [action]})