Ejemplo n.º 1
0
def test_check_task_dependencies_ok_complex():
    a = DummyTask("a", 1, [])
    b = DummyTask("b", 2, [a])
    c = DummyTask("c", 3, [a])
    d = DummyTask("d", 4, [b, c])

    check_task_dependencies(d)
Ejemplo n.º 2
0
def test_check_task_dependencies_ko_direct_dependency():
    a = DummyTask("a", 1, [])
    b = DummyTask("b", 2, [a])
    a.on_success_dependencies.append(b)

    with pytest.raises(CircularDependencyError):
        check_task_dependencies(b)
Ejemplo n.º 3
0
def test_check_task_dependencies_ok():
    a = DummyTask("a", 1, [])
    b = DummyTask("b", 2, [a])

    check_task_dependencies(b)