Beispiel #1
0
def test__DAG_add_task():
    A, B = get_two_tasks()

    dag = DAG()
    dag.add_task(A)

    assert dag.tasks == {A}, "Test Task was not added to the DAG"
Beispiel #2
0
def test__Composer_repr():
    p = pathlib.Path("make_tea.py")
    make_tea = Task(p, "test-exe")
    dag = DAG()
    dag.add_task(make_tea)
    dq = Composer(dag)
    assert repr(dq) == "".join(
        ["Composer(DAG({Task(",
         p.resolve().as_posix(), ")}))"])
Beispiel #3
0
def test__DAG_repr():
    p = pathlib.Path("make_tea.py")
    make_tea = Task(p, "test-env")
    dag = DAG()
    dag.add_task(make_tea)
    assert repr(dag) == "".join(["DAG({Task(", p.resolve().as_posix(), ")})"])