mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
post merge cleanup
This commit is contained in:
@@ -38,7 +38,7 @@ def lint_tsts(tool_xml, lint_ctx):
|
||||
if len(assertions) == 0:
|
||||
continue
|
||||
if len(assertions) > 1:
|
||||
lint_ctx.error(f"Test {test_idx}: More than one {ta} found. Only the first is considered.")
|
||||
lint_ctx.error(f"Test {test_idx}: More than one {ta} found. Only the first is considered.", node=test)
|
||||
has_test = True
|
||||
_check_asserts(test_idx, assertions, lint_ctx)
|
||||
_check_asserts(test_idx, test.findall(".//assert_contents"), lint_ctx)
|
||||
@@ -46,7 +46,7 @@ def lint_tsts(tool_xml, lint_ctx):
|
||||
# check if expect_num_outputs is set if there are outputs with filters
|
||||
filter = tool_xml.findall("./outputs//filter")
|
||||
if len(filter) > 0 and "expect_num_outputs" not in test.attrib:
|
||||
lint_ctx.warn("Test should specify 'expect_num_outputs' if outputs have filters")
|
||||
lint_ctx.warn("Test should specify 'expect_num_outputs' if outputs have filters", node=test)
|
||||
|
||||
# really simple test that test parameters are also present in the inputs
|
||||
for param in test.findall("param"):
|
||||
|
||||
@@ -758,6 +758,7 @@ TESTS_EXPECT_NUM_OUTPUTS_FILTER = """
|
||||
</test>
|
||||
</tests>
|
||||
</tool>
|
||||
"""
|
||||
|
||||
# tool xml for xml_order linter
|
||||
XML_ORDER = """
|
||||
@@ -1575,10 +1576,7 @@ def test_tests_discover_outputs(lint_ctx):
|
||||
def test_tests_expect_num_outputs_filter(lint_ctx):
|
||||
tool_source = get_xml_tool_source(TESTS_EXPECT_NUM_OUTPUTS_FILTER)
|
||||
run_lint(lint_ctx, tests.lint_tsts, tool_source)
|
||||
assert (
|
||||
"Test should specify 'expect_num_outputs' if outputs have filters" in
|
||||
in lint_ctx.warn_messages
|
||||
)
|
||||
assert "Test should specify 'expect_num_outputs' if outputs have filters" in lint_ctx.warn_messages
|
||||
assert len(lint_ctx.warn_messages) == 1
|
||||
assert len(lint_ctx.error_messages) == 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user