From 9ac333a956ec102e0c7ffd7f9979e9d1d242730b Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Mon, 3 May 2021 13:28:49 +0100 Subject: [PATCH] Fix test --- test/TestSkipInsideYaml.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/TestSkipInsideYaml.py b/test/TestSkipInsideYaml.py index e4feb87700..e7207e1651 100644 --- a/test/TestSkipInsideYaml.py +++ b/test/TestSkipInsideYaml.py @@ -2,12 +2,10 @@ ROLE_TASKS = '''\ --- -- name: test command-instead-of-module - command: git log - changed_when: false -- name: test command-instead-of-module (skipped) - command: git log # noqa command-instead-of-module - changed_when: false +- debug: + msg: this should fail linting due lack of name +- debug: # noqa unnamed-task + msg: this should pass due to noqa comment ''' ROLE_TASKS_WITH_BLOCK = '''\ @@ -91,7 +89,9 @@ def test_role_tasks(default_text_runner): results = default_text_runner.run_role_tasks_main(ROLE_TASKS) - assert len(results) == 1 + assert len(results) == 1, results + assert results[0].linenumber == 2 + assert results[0].rule.id == "unnamed-task" def test_role_tasks_with_block(default_text_runner):