diff options
Diffstat (limited to 'test/test_file_path_evaluation.py')
-rw-r--r-- | test/test_file_path_evaluation.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/test_file_path_evaluation.py b/test/test_file_path_evaluation.py index b31f923..69f02bb 100644 --- a/test/test_file_path_evaluation.py +++ b/test/test_file_path_evaluation.py @@ -1,4 +1,5 @@ """Testing file path evaluation when using import_tasks / include_tasks.""" + from __future__ import annotations import textwrap @@ -42,14 +43,14 @@ LAYOUT_IMPORTS: dict[str, str] = { "tasks/subtasks/subtask_1.yml": textwrap.dedent( """\ --- - - name: subtask_1 | From subtask 1 import subtask 2 + - name: subtasks | subtask_1 | From subtask 1 import subtask 2 ansible.builtin.import_tasks: tasks/subtasks/subtask_2.yml """, ), "tasks/subtasks/subtask_2.yml": textwrap.dedent( """\ --- - - name: subtask_2 | From subtask 2 do something + - name: subtasks | subtask_2 | From subtask 2 do something debug: # <-- expected to raise fqcn[action-core] msg: | Something... @@ -86,14 +87,14 @@ LAYOUT_INCLUDES: dict[str, str] = { "tasks/subtasks/subtask_1.yml": textwrap.dedent( """\ --- - - name: subtask_1 | From subtask 1 import subtask 2 + - name: subtasks | subtask_1 | From subtask 1 import subtask 2 ansible.builtin.include_tasks: tasks/subtasks/subtask_2.yml """, ), "tasks/subtasks/subtask_2.yml": textwrap.dedent( """\ --- - - name: subtask_2 | From subtask 2 do something + - name: subtasks | subtask_2 | From subtask 2 do something debug: # <-- expected to raise fqcn[action-core] msg: | Something... @@ -105,8 +106,8 @@ LAYOUT_INCLUDES: dict[str, str] = { @pytest.mark.parametrize( "ansible_project_layout", ( - pytest.param(LAYOUT_IMPORTS, id="using only import_tasks"), - pytest.param(LAYOUT_INCLUDES, id="using only include_tasks"), + pytest.param(LAYOUT_IMPORTS, id="using-only-import_tasks"), + pytest.param(LAYOUT_INCLUDES, id="using-only-include_tasks"), ), ) def test_file_path_evaluation( |