Ejemplo n.º 1
0
def test_simple04():
    assert get_query(tasks, include=["+task4+"]).value == [{
        "operation": "include",
        "task": "task4",
        "upstream": True,
        "downstream": True
    }]
Ejemplo n.º 2
0
def test_full_query02():
    assert get_query(tasks, include=["tag:tag1"],
                     exclude=["group:group2"]).value == [
                         {
                             "operation": "include",
                             "task": "task2",
                             "upstream": False,
                             "downstream": False,
                         },
                         {
                             "operation": "include",
                             "task": "task3",
                             "upstream": False,
                             "downstream": False,
                         },
                         {
                             "operation": "include",
                             "task": "task5",
                             "upstream": False,
                             "downstream": False,
                         },
                         {
                             "operation": "exclude",
                             "task": "task3",
                             "upstream": False,
                             "downstream": False,
                         },
                         {
                             "operation": "exclude",
                             "task": "task4",
                             "upstream": False,
                             "downstream": False,
                         },
                     ]
Ejemplo n.º 3
0
def test_simple03():
    assert get_query(tasks, include=["task2+"]).value == [{
        "operation": "include",
        "task": "task2",
        "upstream": False,
        "downstream": True,
    }]
Ejemplo n.º 4
0
def test_full_query03():
    assert get_query(
        tasks,
        include=["task1", "task2+", "tag:tag1", "+task2"],
        exclude=["group:group3", "+task3"],
    ).value == [
        {
            "operation": "include",
            "task": "task1",
            "upstream": False,
            "downstream": False,
        },
        {
            "operation": "include",
            "task": "task2",
            "upstream": True,
            "downstream": True,
        },
        {
            "operation": "include",
            "task": "task3",
            "upstream": False,
            "downstream": False,
        },
        {
            "operation": "include",
            "task": "task5",
            "upstream": False,
            "downstream": False,
        },
        {
            "operation": "exclude",
            "task": "task5",
            "upstream": False,
            "downstream": False,
        },
        {
            "operation": "exclude",
            "task": "task6",
            "upstream": False,
            "downstream": False,
        },
        {
            "operation": "exclude",
            "task": "task7",
            "upstream": False,
            "downstream": False,
        },
        {
            "operation": "exclude",
            "task": "task3",
            "upstream": True,
            "downstream": False,
        },
    ]
Ejemplo n.º 5
0
def test_group01():
    assert get_query(tasks, include=["group:group1"]).value == [
        {
            "operation": "include",
            "task": "task1",
            "upstream": False,
            "downstream": False,
        },
        {
            "operation": "include",
            "task": "task2",
            "upstream": False,
            "downstream": False,
        },
    ]
Ejemplo n.º 6
0
def test_tag01():
    assert get_query(tasks, include=["tag:tag1"]).value == [
        {
            "operation": "include",
            "task": "task2",
            "upstream": False,
            "downstream": False,
        },
        {
            "operation": "include",
            "task": "task3",
            "upstream": False,
            "downstream": False,
        },
        {
            "operation": "include",
            "task": "task5",
            "upstream": False,
            "downstream": False,
        },
    ]
Ejemplo n.º 7
0
def test_simple02():
    assert get_query(tasks, include=["task_undefined"]).is_err
Ejemplo n.º 8
0
def test_error_identifier03():
    assert get_query(tasks, include=["group:group_undefined"]).is_err
Ejemplo n.º 9
0
def test_error_identifier02():
    assert get_query(tasks, include=["tag:tag_undefined"]).is_err
Ejemplo n.º 10
0
def test_error_identifier01():
    assert get_query(tasks, include=["+_task_undefined"]).is_err