mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 02:04:04 +08:00
Linting fixes.
This commit is contained in:
committed by
Matthias Bernt
parent
ddc270e7d9
commit
13468884d8
@@ -21,7 +21,9 @@ def check_compare_attribs(element, lint_ctx, test_idx):
|
||||
compare = element.get("compare", "diff")
|
||||
for attrib in COMPARE_COMPATIBILITY:
|
||||
if attrib in element.attrib and compare not in COMPARE_COMPATIBILITY[attrib]:
|
||||
lint_ctx.error(f'Test {test_idx}: Attribute {attrib} is incompatible with compare="{compare}".', node=element)
|
||||
lint_ctx.error(
|
||||
f'Test {test_idx}: Attribute {attrib} is incompatible with compare="{compare}".', node=element
|
||||
)
|
||||
|
||||
|
||||
def lint_tests(tool_xml, lint_ctx):
|
||||
|
||||
@@ -1633,14 +1633,8 @@ def test_tests_expect_num_outputs_filter(lint_ctx):
|
||||
def test_tests_compare_attrib_incompatibility(lint_ctx):
|
||||
tool_source = get_xml_tool_source(TESTS_COMPARE_ATTRIB_INCOMPATIBILITY)
|
||||
run_lint(lint_ctx, tests.lint_tsts, tool_source)
|
||||
assert (
|
||||
'Test 1: Attribute decompress is incompatible with compare="re_match".'
|
||||
in lint_ctx.error_messages
|
||||
)
|
||||
assert (
|
||||
'Test 1: Attribute sort is incompatible with compare="contains".'
|
||||
in lint_ctx.error_messages
|
||||
)
|
||||
assert 'Test 1: Attribute decompress is incompatible with compare="re_match".' in lint_ctx.error_messages
|
||||
assert 'Test 1: Attribute sort is incompatible with compare="contains".' in lint_ctx.error_messages
|
||||
assert not lint_ctx.info_messages
|
||||
assert len(lint_ctx.valid_messages) == 1
|
||||
assert not lint_ctx.warn_messages
|
||||
|
||||
Reference in New Issue
Block a user