From a8a80cf431504916d0bd6eac36d624b4435144cd Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Mon, 29 Aug 2022 11:03:22 +0200 Subject: [PATCH] fix typo in test linter --- lib/galaxy/tool_util/linters/tests.py | 4 ++-- test/unit/tool_util/test_tool_linters.py | 25 +++++++++++++++--------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/lib/galaxy/tool_util/linters/tests.py b/lib/galaxy/tool_util/linters/tests.py index 8985e7e1014..fd99d3f8d3e 100644 --- a/lib/galaxy/tool_util/linters/tests.py +++ b/lib/galaxy/tool_util/linters/tests.py @@ -97,9 +97,9 @@ def lint_tsts(tool_xml, lint_ctx): discover_datasets = corresponding_output.find(".//discover_datasets") if discover_datasets is not None: if output.tag == "output": - if "count" not in output.attrib and output.find("./discovered_datasets") is None: + if "count" not in output.attrib and output.find("./discovered_dataset") is None: lint_ctx.error( - f"Test {test_idx}: test output '{name}' must have a 'count' attribute and/or 'discovered_datasets' children", + f"Test {test_idx}: test output '{name}' must have a 'count' attribute and/or 'discovered_dataset' children", node=output, ) pass diff --git a/test/unit/tool_util/test_tool_linters.py b/test/unit/tool_util/test_tool_linters.py index 64f186c0f86..cbc0a2fc88d 100644 --- a/test/unit/tool_util/test_tool_linters.py +++ b/test/unit/tool_util/test_tool_linters.py @@ -686,11 +686,18 @@ TESTS_DISCOVER_OUTPUTS = """ - - + + - + + + + + + + + @@ -1492,21 +1499,21 @@ def test_tests_discover_outputs(lint_ctx): tool_source = get_xml_tool_source(TESTS_DISCOVER_OUTPUTS) run_lint(lint_ctx, tests.lint_tsts, tool_source) assert ( - "Test 2: test output 'data_name' must have a 'count' attribute and/or 'discovered_datasets' children" + "Test 3: test output 'data_name' must have a 'count' attribute and/or 'discovered_dataset' children" in lint_ctx.error_messages ) assert ( - "Test 2: test collection 'collection_name' must have a 'count' attribute or 'element' children" - in lint_ctx.error_messages - ) - assert ( - "Test 2: test collection 'collection_name' must contain nested 'element' tags and/or element childen with a 'count' attribute" + "Test 3: test collection 'collection_name' must have a 'count' attribute or 'element' children" in lint_ctx.error_messages ) assert ( "Test 3: test collection 'collection_name' must contain nested 'element' tags and/or element childen with a 'count' attribute" in lint_ctx.error_messages ) + assert ( + "Test 4: test collection 'collection_name' must contain nested 'element' tags and/or element childen with a 'count' attribute" + in lint_ctx.error_messages + ) assert not lint_ctx.warn_messages assert len(lint_ctx.error_messages) == 4