From ddc270e7d9d65fa30ecf0ea33964fa513a2c4d5f Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Fri, 1 Jul 2022 18:46:28 +0200 Subject: [PATCH] add doc and linting for test output compare attribute --- lib/galaxy/tool_util/xsd/galaxy.xsd | 4 ++-- test/unit/tool_util/test_tool_linters.py | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd index c18e2147baa..85b4752f137 100644 --- a/lib/galaxy/tool_util/xsd/galaxy.xsd +++ b/lib/galaxy/tool_util/xsd/galaxy.xsd @@ -1594,9 +1594,9 @@ by ``file`` using the ``compare`` attribute: - ``re_match``: each line of the history data set is compared to the regular expression specified in the corresponding line of the ``file``. The allowed number of non matching lines can be set with ``lines_diff`` and the history - and local dataset is sorted if ``sort`` is set to ``true``. + dataset is sorted if ``sort`` is set to ``true``. - ``re_match_multiline``: it is checked if the history data sets matches the - multi line regular expression given in ``file``. The history and local datasets are sorted + multi line regular expression given in ``file``. The history dataset is sorted before the comparison if the ``sort`` atrribute is set to ``true``. - ``contains``: check if each line in ``file`` is contained in the history data set. The allowed number of lines that are not contained in the history dataset diff --git a/test/unit/tool_util/test_tool_linters.py b/test/unit/tool_util/test_tool_linters.py index f0b7c4bb8fb..46a6c259b42 100644 --- a/test/unit/tool_util/test_tool_linters.py +++ b/test/unit/tool_util/test_tool_linters.py @@ -1633,8 +1633,14 @@ 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