Warning
This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
galaxy.tool_util.verify package¶
Module of utilities for verifying test results.
-
galaxy.tool_util.verify.
verify
(item_label, output_content, attributes, filename=None, get_filecontent=None, get_filename=None, keep_outputs_dir=None, verify_extra_files=None, mode='file')[source]¶ Verify the content of a test output using test definitions described by attributes.
Throw an informative assertion error if any of these tests fail.
-
galaxy.tool_util.verify.
make_temp_fname
(fname=None)[source]¶ Safe temp name - preserve the file extension for tools that interpret it.
-
galaxy.tool_util.verify.
files_diff
(file1, file2, attributes=None)[source]¶ Check the contents of 2 files for differences.
-
galaxy.tool_util.verify.
files_re_match
(file1, file2, attributes=None)[source]¶ Check the contents of 2 files for differences using re.match.
-
galaxy.tool_util.verify.
files_re_match_multiline
(file1, file2, attributes=None)[source]¶ Check the contents of 2 files for differences using re.match in multiline mode.
-
galaxy.tool_util.verify.
files_contains
(file1, file2, attributes=None)[source]¶ Check the contents of file2 for substrings found in file1, on a per-line basis.
Subpackages¶
Submodules¶
galaxy.tool_util.verify.interactor module¶
-
class
galaxy.tool_util.verify.interactor.
GalaxyInteractorApi
(**kwds)[source]¶ Bases:
object
-
supports_test_data_download
¶
-
target_galaxy_version
¶
-
-
exception
galaxy.tool_util.verify.interactor.
JobOutputsError
(output_exceptions, job_stdio)[source]¶ Bases:
exceptions.AssertionError
-
class
galaxy.tool_util.verify.interactor.
OutputsDict
(*args, **kwds)[source]¶ Bases:
collections.OrderedDict
Ordered dict that can also be accessed by index.
>>> out = OutputsDict() >>> out['item1'] = 1 >>> out['item2'] = 2 >>> out[1] == 2 == out['item2'] True
-
exception
galaxy.tool_util.verify.interactor.
RunToolException
(message, inputs=None)[source]¶ Bases:
exceptions.Exception
-
class
galaxy.tool_util.verify.interactor.
ToolTestDescription
(processed_test_dict)[source]¶ Bases:
object
Encapsulates information about a tool test, and allows creation of a dynamic TestCase class (the unittest framework is very class oriented, doing dynamic tests in this way allows better integration)
-
galaxy.tool_util.verify.interactor.
stage_data_in_history
(galaxy_interactor, tool_id, all_test_data, history=None, force_path_paste=False, maxseconds=86400)[source]¶
galaxy.tool_util.verify.test_data module¶
-
class
galaxy.tool_util.verify.test_data.
TestDataResolver
(file_dirs=None, env_var='GALAXY_TEST_FILE_DIR', environ={'JENKINS_HOME': '/var/lib/jenkins', 'BUILD_CAUSE': 'UPSTREAMTRIGGER', 'JOB_BASE_NAME': 'PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09', 'PYTHON': 'System-CPython-2.7', 'HUDSON_URL': 'https://jenkins.galaxyproject.org/', 'BUILD_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09/3624/', 'RUN_ARTIFACTS_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09/3624/display/redirect?page=artifacts', 'BUILD_TAG': 'jenkins-galaxy-sphinx-by-branch-PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09-3624', 'HUDSON_SERVER_COOKIE': 'f442d5996560f01b', 'JENKINS_URL': 'https://jenkins.galaxyproject.org/', 'LOGNAME': 'jenkins', 'USER': 'jenkins', 'WORKSPACE': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09', 'PATH': '/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv/lib/node_modules/.bin:/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv/bin:/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv/bin:/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv/lib/node_modules/.bin:/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv/bin:/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games', 'HOME': '/home/jenkins', 'PS1': '(.venv) (.venv) $ ', 'JOB_NAME': 'galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09', 'MAKEFLAGS': 'w', 'LANG': 'en_AU.UTF-8', 'RUN_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09/3624/display/redirect', 'VIRTUAL_ENV': '/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv', 'SHELL': '/bin/sh', 'GIT_PREVIOUS_SUCCESSFUL_COMMIT': '2b5982cdab7e3b5839361e9add7e8a39f4f79aee', 'HUDSON_HOME': '/var/lib/jenkins', 'NODE_LABELS': 'GAtests au_node jenkins-aust-4.genome.edu.au', 'MFLAGS': '-w', 'ROOT_BUILD_CAUSE': 'TIMERTRIGGER', 'BUILD_ID': '3624', 'BUILD_NUMBER': '3624', 'XDG_RUNTIME_DIR': '/run/user/1001', 'HUDSON_COOKIE': 'e8a3020f-2031-4d47-b116-3fdb848c1fef', 'JOB_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09/', 'RUN_TESTS_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09/3624/display/redirect?page=tests', 'NODE_VIRTUAL_ENV': '/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv', 'NODE_NAME': 'jenkins-aust-4.genome.edu.au', 'GIT_URL': 'https://github.com/galaxyproject/galaxy/', 'GIT_COMMIT': 'd54c00c972a5ac68e4087a9809c18eb50a7f49b4', 'RUN_CHANGES_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09/3624/display/redirect?page=changes', 'ROOT_BUILD_CAUSE_TIMERTRIGGER': 'true', 'GIT_PREVIOUS_COMMIT': '2b5982cdab7e3b5839361e9add7e8a39f4f79aee', 'XDG_SESSION_ID': '11890', 'AWS_ACCESS_KEY_ID': 'AKIAYX7HSEMC7DKPIMU7', 'npm_config_prefix': '/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv', 'BUILD_CAUSE_UPSTREAMTRIGGER': 'true', 'JOB_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09/display/redirect', 'WORKSPACE_TMP': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09@tmp', 'SSH_CLIENT': '128.118.201.242 6508 22', 'EXECUTOR_NUMBER': '0', 'NODE_PATH': '/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv/lib/node_modules', 'MAKELEVEL': '2', 'PWD': '/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09', 'JENKINS_SERVER_COOKIE': 'f442d5996560f01b', 'BUILD_DISPLAY_NAME': '#3624', 'AWS_SECRET_ACCESS_KEY': 'L+6N5EfuLyZB/84Hv0vAun6h9DXcn0pLcePGuSV9', 'MAIL': '/var/mail/jenkins', 'SSH_CONNECTION': '128.118.201.242 6508 115.146.92.69 22', 'TARGET_GIT_BRANCH': 'release_19.09', 'NPM_CONFIG_PREFIX': '/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv', 'GIT_BRANCH': 'origin/dev'})[source]¶ Bases:
object
-
__init__
(file_dirs=None, env_var='GALAXY_TEST_FILE_DIR', environ={'JENKINS_HOME': '/var/lib/jenkins', 'BUILD_CAUSE': 'UPSTREAMTRIGGER', 'JOB_BASE_NAME': 'PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09', 'PYTHON': 'System-CPython-2.7', 'HUDSON_URL': 'https://jenkins.galaxyproject.org/', 'BUILD_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09/3624/', 'RUN_ARTIFACTS_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09/3624/display/redirect?page=artifacts', 'BUILD_TAG': 'jenkins-galaxy-sphinx-by-branch-PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09-3624', 'HUDSON_SERVER_COOKIE': 'f442d5996560f01b', 'JENKINS_URL': 'https://jenkins.galaxyproject.org/', 'LOGNAME': 'jenkins', 'USER': 'jenkins', 'WORKSPACE': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09', 'PATH': '/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv/lib/node_modules/.bin:/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv/bin:/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv/bin:/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv/lib/node_modules/.bin:/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv/bin:/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games', 'HOME': '/home/jenkins', 'PS1': '(.venv) (.venv) $ ', 'JOB_NAME': 'galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09', 'MAKEFLAGS': 'w', 'LANG': 'en_AU.UTF-8', 'RUN_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09/3624/display/redirect', 'VIRTUAL_ENV': '/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv', 'SHELL': '/bin/sh', 'GIT_PREVIOUS_SUCCESSFUL_COMMIT': '2b5982cdab7e3b5839361e9add7e8a39f4f79aee', 'HUDSON_HOME': '/var/lib/jenkins', 'NODE_LABELS': 'GAtests au_node jenkins-aust-4.genome.edu.au', 'MFLAGS': '-w', 'ROOT_BUILD_CAUSE': 'TIMERTRIGGER', 'BUILD_ID': '3624', 'BUILD_NUMBER': '3624', 'XDG_RUNTIME_DIR': '/run/user/1001', 'HUDSON_COOKIE': 'e8a3020f-2031-4d47-b116-3fdb848c1fef', 'JOB_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09/', 'RUN_TESTS_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09/3624/display/redirect?page=tests', 'NODE_VIRTUAL_ENV': '/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv', 'NODE_NAME': 'jenkins-aust-4.genome.edu.au', 'GIT_URL': 'https://github.com/galaxyproject/galaxy/', 'GIT_COMMIT': 'd54c00c972a5ac68e4087a9809c18eb50a7f49b4', 'RUN_CHANGES_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09/3624/display/redirect?page=changes', 'ROOT_BUILD_CAUSE_TIMERTRIGGER': 'true', 'GIT_PREVIOUS_COMMIT': '2b5982cdab7e3b5839361e9add7e8a39f4f79aee', 'XDG_SESSION_ID': '11890', 'AWS_ACCESS_KEY_ID': 'AKIAYX7HSEMC7DKPIMU7', 'npm_config_prefix': '/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv', 'BUILD_CAUSE_UPSTREAMTRIGGER': 'true', 'JOB_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.09/display/redirect', 'WORKSPACE_TMP': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09@tmp', 'SSH_CLIENT': '128.118.201.242 6508 22', 'EXECUTOR_NUMBER': '0', 'NODE_PATH': '/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv/lib/node_modules', 'MAKELEVEL': '2', 'PWD': '/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09', 'JENKINS_SERVER_COOKIE': 'f442d5996560f01b', 'BUILD_DISPLAY_NAME': '#3624', 'AWS_SECRET_ACCESS_KEY': 'L+6N5EfuLyZB/84Hv0vAun6h9DXcn0pLcePGuSV9', 'MAIL': '/var/mail/jenkins', 'SSH_CONNECTION': '128.118.201.242 6508 115.146.92.69 22', 'TARGET_GIT_BRANCH': 'release_19.09', 'NPM_CONFIG_PREFIX': '/mnt/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.09/.venv', 'GIT_BRANCH': 'origin/dev'})[source]¶
-