

def test_ooc_behavior():
    foo = NetworkDispatcher('foo')

    class A(object):
        pass

    class B(object):
        pass

    class C(object):
        pass
    discover.register((A, B, C))((lambda x: 'int'))
    foo.register(B, A, cost=1.0)((lambda x, **kwargs: 1))
    foo.register(C, B, cost=1.0)((lambda x, **kwargs: (x / 0)))
    foo.register(C, A, cost=10.0)((lambda x, **kwargs: 2))
    assert ([(a, b) for (a, b, func) in path(foo.graph, A, C)] == [(A, B), (B, C)])
    ooc = set([A, C])
    assert ([(a, a) for (a, b, func) in path(foo.graph, A, C, ooc_types=ooc)] == [(A, C)])

dataset/ETHPy150Open blaze/odo/odo/tests/test_core.py test_ooc_behavior/VarMisuse@210/224 `b`->`a`