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.
OutputsDict
[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
-
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]¶
-
class
galaxy.tool_util.verify.interactor.
GalaxyInteractorApi
(**kwds)[source]¶ Bases:
object
-
target_galaxy_version
¶
-
supports_test_data_download
¶
-
-
exception
galaxy.tool_util.verify.interactor.
RunToolException
(message, inputs=None)[source]¶ Bases:
Exception
-
galaxy.tool_util.verify.interactor.
verify_hid
(filename, hda_id, attributes, test_data_downloader, hid='', dataset_fetcher=None, keep_outputs_dir=False)[source]¶
-
galaxy.tool_util.verify.interactor.
verify_tool
(tool_id, galaxy_interactor, resource_parameters=None, register_job_data=None, test_index=0, tool_version=None, quiet=False, test_history=None, force_path_paste=False, maxseconds=86400, tool_test_dicts=None)[source]¶
-
exception
galaxy.tool_util.verify.interactor.
JobOutputsError
(output_exceptions, job_stdio)[source]¶ Bases:
AssertionError
-
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.test_data module¶
-
class
galaxy.tool_util.verify.test_data.
TestDataResolver
(file_dirs=None, env_var='GALAXY_TEST_FILE_DIR', environ=environ({'BUILD_CAUSE_UPSTREAMTRIGGER': 'true', 'GIT_URL': 'https://github.com/galaxyproject/galaxy/', 'XDG_SESSION_CLASS': 'user', 'XDG_SESSION_TYPE': 'tty', 'SHELL': '/bin/sh', 'GIT_COMMIT': '6bdbe954c970bc798ce037b33f60f4ac2b9cc750', 'BUILD_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01/3824/', 'BUILD_DISPLAY_NAME': '#3824', 'SSH_CONNECTION': '172.18.2.43 38176 172.18.2.52 22', 'PATH': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv/lib/node_modules/.bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv/bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv/bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv/lib/node_modules/.bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv/bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv/bin:/usr/local/bin:/usr/bin:/bin:/usr/games', 'XDG_RUNTIME_DIR': '/run/user/1000', 'VIRTUAL_ENV': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv', 'RUN_TESTS_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01/3824/display/redirect?page=tests', 'HUDSON_HOME': '/var/lib/jenkins', 'RUN_ARTIFACTS_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01/3824/display/redirect?page=artifacts', 'WORKSPACE_TMP': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01@tmp', 'HUDSON_SERVER_COOKIE': 'f442d5996560f01b', 'EXECUTOR_NUMBER': '0', 'PWD': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01', 'NPM_CONFIG_PREFIX': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv', 'BUILD_ID': '3824', 'PYTHON': 'System-CPython-2.7', 'JOB_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01/display/redirect', 'HOME': '/home/jenkins', 'HUDSON_URL': 'https://jenkins.galaxyproject.org/', 'NODE_LABELS': 'doc_builder n12.galaxyproject.org psu_node', 'LOGNAME': 'jenkins', 'GIT_PREVIOUS_COMMIT': '088c8430d1ac894a05017900edc525e3d98a53e0', 'JOB_BASE_NAME': 'PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01', 'CI': 'true', 'NODE_VIRTUAL_ENV': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv', 'ROOT_BUILD_CAUSE': 'TIMERTRIGGER', 'BUILD_TAG': 'jenkins-galaxy-sphinx-by-branch-PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01-3824', 'XDG_SESSION_ID': '4205', 'USER': 'jenkins', 'npm_config_prefix': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv', 'JENKINS_HOME': '/var/lib/jenkins', 'AWS_SECRET_ACCESS_KEY': 'L+6N5EfuLyZB/84Hv0vAun6h9DXcn0pLcePGuSV9', 'JOB_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01/', 'NODE_PATH': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv/lib/node_modules', 'GIT_PREVIOUS_SUCCESSFUL_COMMIT': '088c8430d1ac894a05017900edc525e3d98a53e0', 'TARGET_GIT_BRANCH': 'release_20.01', 'JENKINS_SERVER_COOKIE': 'f442d5996560f01b', 'MAKEFLAGS': 'w', 'MFLAGS': '-w', 'SSH_CLIENT': '172.18.2.43 38176 22', 'MAIL': '/var/mail/jenkins', 'JENKINS_URL': 'https://jenkins.galaxyproject.org/', 'WORKSPACE': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01', 'PS1': '(.venv) (.venv) $ ', 'AWS_ACCESS_KEY_ID': 'AKIAYX7HSEMC7DKPIMU7', 'ROOT_BUILD_CAUSE_TIMERTRIGGER': 'true', 'GIT_BRANCH': 'origin/dev', 'RUN_CHANGES_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01/3824/display/redirect?page=changes', 'BUILD_NUMBER': '3824', 'RUN_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01/3824/display/redirect', 'JOB_NAME': 'galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01', 'LANG': 'en_US.UTF-8', 'HUDSON_COOKIE': 'aa7c7be8-8ec2-4d4c-a1e5-c3d732e979db', 'BUILD_CAUSE': 'UPSTREAMTRIGGER', 'NODE_NAME': 'n12.galaxyproject.org', 'MAKELEVEL': '2'}))[source]¶ Bases:
object
-
__init__
(file_dirs=None, env_var='GALAXY_TEST_FILE_DIR', environ=environ({'BUILD_CAUSE_UPSTREAMTRIGGER': 'true', 'GIT_URL': 'https://github.com/galaxyproject/galaxy/', 'XDG_SESSION_CLASS': 'user', 'XDG_SESSION_TYPE': 'tty', 'SHELL': '/bin/sh', 'GIT_COMMIT': '6bdbe954c970bc798ce037b33f60f4ac2b9cc750', 'BUILD_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01/3824/', 'BUILD_DISPLAY_NAME': '#3824', 'SSH_CONNECTION': '172.18.2.43 38176 172.18.2.52 22', 'PATH': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv/lib/node_modules/.bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv/bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv/bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv/lib/node_modules/.bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv/bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv/bin:/usr/local/bin:/usr/bin:/bin:/usr/games', 'XDG_RUNTIME_DIR': '/run/user/1000', 'VIRTUAL_ENV': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv', 'RUN_TESTS_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01/3824/display/redirect?page=tests', 'HUDSON_HOME': '/var/lib/jenkins', 'RUN_ARTIFACTS_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01/3824/display/redirect?page=artifacts', 'WORKSPACE_TMP': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01@tmp', 'HUDSON_SERVER_COOKIE': 'f442d5996560f01b', 'EXECUTOR_NUMBER': '0', 'PWD': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01', 'NPM_CONFIG_PREFIX': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv', 'BUILD_ID': '3824', 'PYTHON': 'System-CPython-2.7', 'JOB_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01/display/redirect', 'HOME': '/home/jenkins', 'HUDSON_URL': 'https://jenkins.galaxyproject.org/', 'NODE_LABELS': 'doc_builder n12.galaxyproject.org psu_node', 'LOGNAME': 'jenkins', 'GIT_PREVIOUS_COMMIT': '088c8430d1ac894a05017900edc525e3d98a53e0', 'JOB_BASE_NAME': 'PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01', 'CI': 'true', 'NODE_VIRTUAL_ENV': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv', 'ROOT_BUILD_CAUSE': 'TIMERTRIGGER', 'BUILD_TAG': 'jenkins-galaxy-sphinx-by-branch-PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01-3824', 'XDG_SESSION_ID': '4205', 'USER': 'jenkins', 'npm_config_prefix': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv', 'JENKINS_HOME': '/var/lib/jenkins', 'AWS_SECRET_ACCESS_KEY': 'L+6N5EfuLyZB/84Hv0vAun6h9DXcn0pLcePGuSV9', 'JOB_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01/', 'NODE_PATH': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01/.venv/lib/node_modules', 'GIT_PREVIOUS_SUCCESSFUL_COMMIT': '088c8430d1ac894a05017900edc525e3d98a53e0', 'TARGET_GIT_BRANCH': 'release_20.01', 'JENKINS_SERVER_COOKIE': 'f442d5996560f01b', 'MAKEFLAGS': 'w', 'MFLAGS': '-w', 'SSH_CLIENT': '172.18.2.43 38176 22', 'MAIL': '/var/mail/jenkins', 'JENKINS_URL': 'https://jenkins.galaxyproject.org/', 'WORKSPACE': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_20.01', 'PS1': '(.venv) (.venv) $ ', 'AWS_ACCESS_KEY_ID': 'AKIAYX7HSEMC7DKPIMU7', 'ROOT_BUILD_CAUSE_TIMERTRIGGER': 'true', 'GIT_BRANCH': 'origin/dev', 'RUN_CHANGES_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01/3824/display/redirect?page=changes', 'BUILD_NUMBER': '3824', 'RUN_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01/3824/display/redirect', 'JOB_NAME': 'galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_20.01', 'LANG': 'en_US.UTF-8', 'HUDSON_COOKIE': 'aa7c7be8-8ec2-4d4c-a1e5-c3d732e979db', 'BUILD_CAUSE': 'UPSTREAMTRIGGER', 'NODE_NAME': 'n12.galaxyproject.org', 'MAKELEVEL': '2'}))[source]¶
-