Warning

This document is for an old release 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.tools.verify package

Module of utilities for verifying test results.

galaxy.tools.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.tools.verify.make_temp_fname(fname=None)[source]

Safe temp name - preserve the file extension for tools that interpret it.

galaxy.tools.verify.files_diff(file1, file2, attributes=None)[source]

Check the contents of 2 files for differences.

galaxy.tools.verify.files_re_match(file1, file2, attributes=None)[source]

Check the contents of 2 files for differences using re.match.

galaxy.tools.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.tools.verify.files_contains(file1, file2, attributes=None)[source]

Check the contents of file2 for substrings found in file1, on a per-line basis.

Submodules

galaxy.tools.verify.interactor module

class galaxy.tools.verify.interactor.GalaxyInteractorApi(**kwds)[source]

Bases: object

__init__(**kwds)[source]
delete_history(history)[source]
ensure_user_with_email(email, password=None)[source]
format_for_summary(blob, empty_message, prefix='| ')[source]
get_job_stdio(job_id)[source]
get_tests_summary()[source]
get_tool_tests(tool_id, tool_version=None)[source]
new_history(history_name='test_history')[source]
output_hid(output_data)[source]
run_tool(testdef, history_id, resource_parameters={})[source]
stage_data_async(test_data, history_id, tool_id, force_path_paste=False, maxseconds=86400)[source]
supports_test_data_download
target_galaxy_version
test_data_download(tool_id, filename, mode='file')[source]
test_data_path(tool_id, filename)[source]
verify_output(history_id, jobs, output_data, output_testdef, tool_id, maxseconds)[source]
verify_output_dataset(history_id, hda_id, outfile, attributes, tool_id)[source]
wait_for(func, what='Tool test run', **kwd)[source]
wait_for_job(job_id, history_id, maxseconds)[source]
wait_for_jobs(history_id, jobs, maxseconds)[source]
exception galaxy.tools.verify.interactor.JobOutputsError(output_exceptions, job_stdio)[source]

Bases: exceptions.AssertionError

__init__(output_exceptions, job_stdio)[source]
class galaxy.tools.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.tools.verify.interactor.RunToolException(message, inputs=None)[source]

Bases: exceptions.Exception

__init__(message, inputs=None)[source]
class galaxy.tools.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)

__init__(processed_test_dict)[source]
test_data()[source]

Iterator over metadata representing the required files for upload.

to_dict()[source]
galaxy.tools.verify.interactor.stage_data_in_history(galaxy_interactor, tool_id, all_test_data, history=None, force_path_paste=False, maxseconds=86400)[source]
galaxy.tools.verify.interactor.test_data_iter(required_files)[source]
galaxy.tools.verify.interactor.verify_hid(filename, hda_id, attributes, test_data_downloader, hid='', dataset_fetcher=None, keep_outputs_dir=False)[source]
galaxy.tools.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]

galaxy.tools.verify.script module

galaxy.tools.verify.script.main(argv=None)[source]

galaxy.tools.verify.test_data module

class galaxy.tools.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.05', '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.05/3157/', 'GIT_PREVIOUS_COMMIT': '4b457a81303c5ebf41ba28b9c8659368fd3ccc8e', 'BUILD_TAG': 'jenkins-galaxy-sphinx-by-branch-PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.05-3157', '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.05', 'HOME': '/home/jenkins', 'NODE_LABELS': 'doc_builder n13.galaxyproject.org p4machine psu_node', 'PS1': '(.venv) (.venv) $ ', 'JOB_NAME': 'galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.05', 'MAKEFLAGS': 'w', 'LANG': 'en_US.UTF-8', 'RUN_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.05/3157/display/redirect', 'VIRTUAL_ENV': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv', 'SHELL': '/bin/sh', 'GIT_PREVIOUS_SUCCESSFUL_COMMIT': '4b457a81303c5ebf41ba28b9c8659368fd3ccc8e', 'HUDSON_HOME': '/var/lib/jenkins', 'MFLAGS': '-w', 'ROOT_BUILD_CAUSE': 'TIMERTRIGGER', 'BUILD_ID': '3157', 'BUILD_NUMBER': '3157', 'XDG_RUNTIME_DIR': '/run/user/999', 'HUDSON_COOKIE': '69fa512f-9a70-4813-90fb-b79ce672f3f0', 'JOB_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.05/', 'NODE_VIRTUAL_ENV': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv', 'PATH': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv/lib/node_modules/.bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv/bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv/bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv/lib/node_modules/.bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv/bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv/bin:/usr/local/bin:/usr/bin:/bin:/usr/games', 'NODE_NAME': 'n13.galaxyproject.org', 'GIT_URL': 'https://github.com/galaxyproject/galaxy/', 'GIT_COMMIT': '4b457a81303c5ebf41ba28b9c8659368fd3ccc8e', 'RUN_CHANGES_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.05/3157/display/redirect?page=changes', 'ROOT_BUILD_CAUSE_TIMERTRIGGER': 'true', 'XDG_SESSION_ID': '3050', 'npm_config_prefix': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.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.05/display/redirect', 'TARGET_GIT_BRANCH': 'release_19.05', 'SSH_CLIENT': '172.18.2.43 40208 22', 'EXECUTOR_NUMBER': '0', 'NODE_PATH': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv/lib/node_modules', 'MAKELEVEL': '2', 'PWD': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05', 'JENKINS_SERVER_COOKIE': 'f442d5996560f01b', 'BUILD_DISPLAY_NAME': '#3157', 'MAIL': '/var/mail/jenkins', 'SSH_CONNECTION': '172.18.2.43 40208 172.18.2.53 22', 'NPM_CONFIG_PREFIX': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.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.05', '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.05/3157/', 'GIT_PREVIOUS_COMMIT': '4b457a81303c5ebf41ba28b9c8659368fd3ccc8e', 'BUILD_TAG': 'jenkins-galaxy-sphinx-by-branch-PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.05-3157', '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.05', 'HOME': '/home/jenkins', 'NODE_LABELS': 'doc_builder n13.galaxyproject.org p4machine psu_node', 'PS1': '(.venv) (.venv) $ ', 'JOB_NAME': 'galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.05', 'MAKEFLAGS': 'w', 'LANG': 'en_US.UTF-8', 'RUN_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.05/3157/display/redirect', 'VIRTUAL_ENV': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv', 'SHELL': '/bin/sh', 'GIT_PREVIOUS_SUCCESSFUL_COMMIT': '4b457a81303c5ebf41ba28b9c8659368fd3ccc8e', 'HUDSON_HOME': '/var/lib/jenkins', 'MFLAGS': '-w', 'ROOT_BUILD_CAUSE': 'TIMERTRIGGER', 'BUILD_ID': '3157', 'BUILD_NUMBER': '3157', 'XDG_RUNTIME_DIR': '/run/user/999', 'HUDSON_COOKIE': '69fa512f-9a70-4813-90fb-b79ce672f3f0', 'JOB_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.05/', 'NODE_VIRTUAL_ENV': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv', 'PATH': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv/lib/node_modules/.bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv/bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv/bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv/lib/node_modules/.bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv/bin:/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv/bin:/usr/local/bin:/usr/bin:/bin:/usr/games', 'NODE_NAME': 'n13.galaxyproject.org', 'GIT_URL': 'https://github.com/galaxyproject/galaxy/', 'GIT_COMMIT': '4b457a81303c5ebf41ba28b9c8659368fd3ccc8e', 'RUN_CHANGES_DISPLAY_URL': 'https://jenkins.galaxyproject.org/job/galaxy-sphinx-by-branch/PYTHON=System-CPython-2.7, TARGET_GIT_BRANCH=release_19.05/3157/display/redirect?page=changes', 'ROOT_BUILD_CAUSE_TIMERTRIGGER': 'true', 'XDG_SESSION_ID': '3050', 'npm_config_prefix': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.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.05/display/redirect', 'TARGET_GIT_BRANCH': 'release_19.05', 'SSH_CLIENT': '172.18.2.43 40208 22', 'EXECUTOR_NUMBER': '0', 'NODE_PATH': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv/lib/node_modules', 'MAKELEVEL': '2', 'PWD': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05', 'JENKINS_SERVER_COOKIE': 'f442d5996560f01b', 'BUILD_DISPLAY_NAME': '#3157', 'MAIL': '/var/mail/jenkins', 'SSH_CONNECTION': '172.18.2.43 40208 172.18.2.53 22', 'NPM_CONFIG_PREFIX': '/var/jenkins/workspace/galaxy-sphinx-by-branch/PYTHON/System-CPython-2.7/TARGET_GIT_BRANCH/release_19.05/.venv', 'GIT_BRANCH': 'origin/dev'})[source]
get_filename(name)[source]
get_filecontent(name)[source]
get_directory(name)[source]
galaxy.tools.verify.test_data.build_resolver(uri, environ)[source]
class galaxy.tools.verify.test_data.FileDataResolver(file_dir)[source]

Bases: object

__init__(file_dir)[source]
exists(filename)[source]
path(filename)[source]
class galaxy.tools.verify.test_data.GitDataResolver(repository, environ)[source]

Bases: galaxy.tools.verify.test_data.FileDataResolver

__init__(repository, environ)[source]
exists(filename)[source]
update_repository()[source]
execute(cmd)[source]