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.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_delta(file1, file2, attributes=None)[source]¶
Check the contents of 2 files for size differences.
- 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:
dict
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, tool_version=None)[source]¶
- class galaxy.tool_util.verify.interactor.GalaxyInteractorApi(**kwds)[source]¶
Bases:
object
- property target_galaxy_version¶
- property supports_test_data_download¶
- verify_output_collection(output_collection_def, output_collection_id, history, tool_id, tool_version=None)[source]¶
- verify_output(history_id, jobs, output_data, output_testdef, tool_id, maxseconds, tool_version=None)[source]¶
- galaxy.tool_util.verify.interactor.ensure_tool_run_response_okay(submit_response_object, request_desc, inputs=None)[source]¶
- exception galaxy.tool_util.verify.interactor.RunToolException(message, inputs=None, dynamic_param_error=False)[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_collection(output_collection_def, data_collection, verify_dataset)[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, no_history_cleanup=False, publish_history=False, force_path_paste=False, maxseconds=86400, tool_test_dicts=None, client_test_config=None, skip_with_reference_data=False, skip_on_dynamic_param_errors=False)[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.script module¶
- class galaxy.tool_util.verify.script.TestReference(tool_id, tool_version, test_index)¶
Bases:
tuple
- property test_index¶
Alias for field number 2
- property tool_id¶
Alias for field number 0
- property tool_version¶
Alias for field number 1
- class galaxy.tool_util.verify.script.TestException(tool_id, exception, was_recorded)¶
Bases:
tuple
- property exception¶
Alias for field number 1
- property tool_id¶
Alias for field number 0
- property was_recorded¶
Alias for field number 2
- class galaxy.tool_util.verify.script.Results(default_suitename, test_json, append=False, galaxy_url=None)[source]¶
Bases:
object
- property success_count¶
- property skip_count¶
- property error_count¶
- property failure_count¶
- galaxy.tool_util.verify.script.test_tools(galaxy_interactor, test_references, results, log=None, parallel_tests=1, history_per_test_case=False, history_name=None, no_history_reuse=False, no_history_cleanup=False, publish_history=False, retries=0, verify_kwds=None)[source]¶
Run through tool tests and write report.
Refactor this into Galaxy in 21.01.
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({'JAVA_HOME': '/usr/lib/jvm/temurin-11-jdk-amd64', 'LEIN_HOME': '/usr/local/lib/lein', 'GHCUP_INSTALL_BASE_PREFIX': '/usr/local', 'RUNNER_NAME': 'GitHub Actions 25', 'GITHUB_REF_NAME': 'release_22.01', 'ACCEPT_EULA': 'Y', 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE': '1', 'GITHUB_ENV': '/home/runner/work/_temp/_runner_file_commands/set_env_8cec92e8-0445-49f8-bbf9-916b5be6bcb7', 'STATS_RDCL': 'true', 'GITHUB_REPOSITORY_ID': '31211061', 'RUNNER_TRACKING_ID': 'github_336133ce-7c59-4e53-81cc-ce3fa262e265', 'GITHUB_REPOSITORY_OWNER': 'galaxyproject', 'NVM_DIR': '/home/runner/.nvm', 'JAVA_HOME_17_X64': '/usr/lib/jvm/temurin-17-jdk-amd64', 'GITHUB_EVENT_NAME': 'push', 'SGX_AESM_ADDR': '1', 'PWD': '/home/runner/work/galaxy/galaxy', 'GITHUB_ACTION_REPOSITORY': '', 'RUNNER_WORKSPACE': '/home/runner/work/galaxy', 'GITHUB_WORKFLOW_SHA': '101d4a6d41e9118849f946f0418580d3121400d6', 'RUNNER_OS': 'Linux', 'EDGEWEBDRIVER': '/usr/local/share/edge_driver', 'CI': 'true', 'LANG': 'C.UTF-8', 'RUNNER_TEMP': '/home/runner/work/_temp', 'GITHUB_SERVER_URL': 'https://github.com', 'STATS_TRP': 'true', 'PERFLOG_LOCATION_SETTING': 'RUNNER_PERFLOG', 'RUNNER_USER': 'runner', 'GITHUB_API_URL': 'https://api.github.com', 'MAKEFLAGS': 'w', 'CHROME_BIN': '/usr/bin/google-chrome', 'GITHUB_SHA': '101d4a6d41e9118849f946f0418580d3121400d6', 'ANDROID_NDK_HOME': '/usr/local/lib/android/sdk/ndk/27.1.12297006', 'GITHUB_ACTOR_ID': '6804901', 'POWERSHELL_DISTRIBUTION_CHANNEL': 'GitHub-Actions-ubuntu22', 'SELENIUM_JAR_PATH': '/usr/share/java/selenium-server.jar', 'GOROOT_1_21_X64': '/opt/hostedtoolcache/go/1.21.13/x64', 'pythonLocation': '/opt/hostedtoolcache/Python/3.7.17/x64', 'MFLAGS': '-w', 'ANDROID_NDK_LATEST_HOME': '/usr/local/lib/android/sdk/ndk/27.1.12297006', 'STATS_EXT': 'true', 'BOOTSTRAP_HASKELL_NONINTERACTIVE': '1', 'JAVA_HOME_8_X64': '/usr/lib/jvm/temurin-8-jdk-amd64', 'PIPX_HOME': '/opt/pipx', 'STATS_TIS': 'mining', 'GITHUB_RUN_ATTEMPT': '1', 'RUNNER_PERFLOG': '/home/runner/perflog', 'GITHUB_TRIGGERING_ACTOR': 'mvdbeek', 'DOTNET_NOLOGO': '1', 'DOTNET_MULTILEVEL_LOOKUP': '0', 'JAVA_HOME_11_X64': '/usr/lib/jvm/temurin-11-jdk-amd64', 'GITHUB_REF': 'refs/heads/release_22.01', 'GITHUB_RUN_NUMBER': '24257', 'ANDROID_SDK_ROOT': '/usr/local/lib/android/sdk', 'GITHUB_JOB': 'build', 'ANDROID_HOME': '/usr/local/lib/android/sdk', 'LD_LIBRARY_PATH': '/opt/hostedtoolcache/Python/3.7.17/x64/lib', 'GITHUB_STATE': '/home/runner/work/_temp/_runner_file_commands/save_state_8cec92e8-0445-49f8-bbf9-916b5be6bcb7', 'SHLVL': '1', 'ANDROID_NDK': '/usr/local/lib/android/sdk/ndk/27.1.12297006', 'ImageVersion': '20240915.1.0', 'PATH': '/opt/hostedtoolcache/Python/3.7.17/x64/bin:/opt/hostedtoolcache/Python/3.7.17/x64:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin', 'LEIN_JAR': '/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar', 'GITHUB_EVENT_PATH': '/home/runner/work/_temp/_github_workflow/event.json', 'STATS_D': 'false', 'STATS_D_D': 'false', 'STATS_UE': 'true', 'GRADLE_HOME': '/usr/share/gradle-8.10.1', 'GITHUB_RETENTION_DAYS': '90', 'INVOCATION_ID': 'e027f936dd41449fb69ad5682f2c210b', 'XDG_CONFIG_HOME': '/home/runner/.config', 'GITHUB_ACTIONS': 'true', 'GITHUB_WORKFLOW_REF': 'galaxyproject/galaxy/.github/workflows/docs.yaml@refs/heads/release_22.01', 'CONDA': '/usr/share/miniconda', 'GITHUB_HEAD_REF': '', 'STATS_EXTP': 'https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.189/provjobd.data', 'CHROMEWEBDRIVER': '/usr/local/share/chromedriver-linux64', 'PIPX_BIN_DIR': '/opt/pipx_bin', 'GITHUB_REF_PROTECTED': 'true', 'DEPLOYMENT_BASEPATH': '/opt/runner', 'GITHUB_REF_TYPE': 'branch', 'GECKOWEBDRIVER': '/usr/local/share/gecko_driver', 'SYSTEMD_EXEC_PID': '608', 'GITHUB_ACTION_REF': '', 'GITHUB_WORKSPACE': '/home/runner/work/galaxy/galaxy', 'USER': 'runner', 'SWIFT_PATH': '/usr/share/swift/usr/bin', 'STATS_VMD': 'true', 'GITHUB_STEP_SUMMARY': '/home/runner/work/_temp/_runner_file_commands/step_summary_8cec92e8-0445-49f8-bbf9-916b5be6bcb7', 'RUNNER_ARCH': 'X64', 'GITHUB_PATH': '/home/runner/work/_temp/_runner_file_commands/add_path_8cec92e8-0445-49f8-bbf9-916b5be6bcb7', 'RUNNER_TOOL_CACHE': '/opt/hostedtoolcache', '_': '/usr/bin/make', 'ANDROID_NDK_ROOT': '/usr/local/lib/android/sdk/ndk/27.1.12297006', 'XDG_RUNTIME_DIR': '/run/user/1001', 'AGENT_TOOLSDIRECTORY': '/opt/hostedtoolcache', 'GITHUB_REPOSITORY': 'galaxyproject/galaxy', 'VCPKG_INSTALLATION_ROOT': '/usr/local/share/vcpkg', 'JOURNAL_STREAM': '8:6153', 'GITHUB_ACTION': '__run_8', 'DEBIAN_FRONTEND': 'noninteractive', 'HOME': '/home/runner', 'GITHUB_GRAPHQL_URL': 'https://api.github.com/graphql', 'GITHUB_WORKFLOW': 'Build docs', 'GOROOT_1_20_X64': '/opt/hostedtoolcache/go/1.20.14/x64', 'GITHUB_RUN_ID': '10954658954', 'HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS': '3650', 'GITHUB_ACTOR': 'mvdbeek', 'ANT_HOME': '/usr/share/ant', 'ImageOS': 'ubuntu22', 'ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE': '/opt/actionarchivecache', 'TARGET_BRANCH': 'release_22.01', 'GITHUB_OUTPUT': '/home/runner/work/_temp/_runner_file_commands/set_output_8cec92e8-0445-49f8-bbf9-916b5be6bcb7', 'GITHUB_BASE_REF': '', 'STATS_V3PS': 'true', 'GITHUB_REPOSITORY_OWNER_ID': '7937847', 'GOROOT_1_22_X64': '/opt/hostedtoolcache/go/1.22.7/x64', 'AZURE_EXTENSION_DIR': '/opt/az/azcliextensions', 'RUNNER_ENVIRONMENT': 'github-hosted', 'STATS_VMFE': 'true', 'HOMEBREW_NO_AUTO_UPDATE': '1', 'JAVA_HOME_21_X64': '/usr/lib/jvm/temurin-21-jdk-amd64', 'MAKELEVEL': '2', 'DOCUTILSCONFIG': '/home/runner/work/galaxy/galaxy/doc/source/docutils.conf'}))[source]¶
Bases:
object
- __init__(file_dirs=None, env_var='GALAXY_TEST_FILE_DIR', environ=environ({'JAVA_HOME': '/usr/lib/jvm/temurin-11-jdk-amd64', 'LEIN_HOME': '/usr/local/lib/lein', 'GHCUP_INSTALL_BASE_PREFIX': '/usr/local', 'RUNNER_NAME': 'GitHub Actions 25', 'GITHUB_REF_NAME': 'release_22.01', 'ACCEPT_EULA': 'Y', 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE': '1', 'GITHUB_ENV': '/home/runner/work/_temp/_runner_file_commands/set_env_8cec92e8-0445-49f8-bbf9-916b5be6bcb7', 'STATS_RDCL': 'true', 'GITHUB_REPOSITORY_ID': '31211061', 'RUNNER_TRACKING_ID': 'github_336133ce-7c59-4e53-81cc-ce3fa262e265', 'GITHUB_REPOSITORY_OWNER': 'galaxyproject', 'NVM_DIR': '/home/runner/.nvm', 'JAVA_HOME_17_X64': '/usr/lib/jvm/temurin-17-jdk-amd64', 'GITHUB_EVENT_NAME': 'push', 'SGX_AESM_ADDR': '1', 'PWD': '/home/runner/work/galaxy/galaxy', 'GITHUB_ACTION_REPOSITORY': '', 'RUNNER_WORKSPACE': '/home/runner/work/galaxy', 'GITHUB_WORKFLOW_SHA': '101d4a6d41e9118849f946f0418580d3121400d6', 'RUNNER_OS': 'Linux', 'EDGEWEBDRIVER': '/usr/local/share/edge_driver', 'CI': 'true', 'LANG': 'C.UTF-8', 'RUNNER_TEMP': '/home/runner/work/_temp', 'GITHUB_SERVER_URL': 'https://github.com', 'STATS_TRP': 'true', 'PERFLOG_LOCATION_SETTING': 'RUNNER_PERFLOG', 'RUNNER_USER': 'runner', 'GITHUB_API_URL': 'https://api.github.com', 'MAKEFLAGS': 'w', 'CHROME_BIN': '/usr/bin/google-chrome', 'GITHUB_SHA': '101d4a6d41e9118849f946f0418580d3121400d6', 'ANDROID_NDK_HOME': '/usr/local/lib/android/sdk/ndk/27.1.12297006', 'GITHUB_ACTOR_ID': '6804901', 'POWERSHELL_DISTRIBUTION_CHANNEL': 'GitHub-Actions-ubuntu22', 'SELENIUM_JAR_PATH': '/usr/share/java/selenium-server.jar', 'GOROOT_1_21_X64': '/opt/hostedtoolcache/go/1.21.13/x64', 'pythonLocation': '/opt/hostedtoolcache/Python/3.7.17/x64', 'MFLAGS': '-w', 'ANDROID_NDK_LATEST_HOME': '/usr/local/lib/android/sdk/ndk/27.1.12297006', 'STATS_EXT': 'true', 'BOOTSTRAP_HASKELL_NONINTERACTIVE': '1', 'JAVA_HOME_8_X64': '/usr/lib/jvm/temurin-8-jdk-amd64', 'PIPX_HOME': '/opt/pipx', 'STATS_TIS': 'mining', 'GITHUB_RUN_ATTEMPT': '1', 'RUNNER_PERFLOG': '/home/runner/perflog', 'GITHUB_TRIGGERING_ACTOR': 'mvdbeek', 'DOTNET_NOLOGO': '1', 'DOTNET_MULTILEVEL_LOOKUP': '0', 'JAVA_HOME_11_X64': '/usr/lib/jvm/temurin-11-jdk-amd64', 'GITHUB_REF': 'refs/heads/release_22.01', 'GITHUB_RUN_NUMBER': '24257', 'ANDROID_SDK_ROOT': '/usr/local/lib/android/sdk', 'GITHUB_JOB': 'build', 'ANDROID_HOME': '/usr/local/lib/android/sdk', 'LD_LIBRARY_PATH': '/opt/hostedtoolcache/Python/3.7.17/x64/lib', 'GITHUB_STATE': '/home/runner/work/_temp/_runner_file_commands/save_state_8cec92e8-0445-49f8-bbf9-916b5be6bcb7', 'SHLVL': '1', 'ANDROID_NDK': '/usr/local/lib/android/sdk/ndk/27.1.12297006', 'ImageVersion': '20240915.1.0', 'PATH': '/opt/hostedtoolcache/Python/3.7.17/x64/bin:/opt/hostedtoolcache/Python/3.7.17/x64:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin', 'LEIN_JAR': '/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar', 'GITHUB_EVENT_PATH': '/home/runner/work/_temp/_github_workflow/event.json', 'STATS_D': 'false', 'STATS_D_D': 'false', 'STATS_UE': 'true', 'GRADLE_HOME': '/usr/share/gradle-8.10.1', 'GITHUB_RETENTION_DAYS': '90', 'INVOCATION_ID': 'e027f936dd41449fb69ad5682f2c210b', 'XDG_CONFIG_HOME': '/home/runner/.config', 'GITHUB_ACTIONS': 'true', 'GITHUB_WORKFLOW_REF': 'galaxyproject/galaxy/.github/workflows/docs.yaml@refs/heads/release_22.01', 'CONDA': '/usr/share/miniconda', 'GITHUB_HEAD_REF': '', 'STATS_EXTP': 'https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.189/provjobd.data', 'CHROMEWEBDRIVER': '/usr/local/share/chromedriver-linux64', 'PIPX_BIN_DIR': '/opt/pipx_bin', 'GITHUB_REF_PROTECTED': 'true', 'DEPLOYMENT_BASEPATH': '/opt/runner', 'GITHUB_REF_TYPE': 'branch', 'GECKOWEBDRIVER': '/usr/local/share/gecko_driver', 'SYSTEMD_EXEC_PID': '608', 'GITHUB_ACTION_REF': '', 'GITHUB_WORKSPACE': '/home/runner/work/galaxy/galaxy', 'USER': 'runner', 'SWIFT_PATH': '/usr/share/swift/usr/bin', 'STATS_VMD': 'true', 'GITHUB_STEP_SUMMARY': '/home/runner/work/_temp/_runner_file_commands/step_summary_8cec92e8-0445-49f8-bbf9-916b5be6bcb7', 'RUNNER_ARCH': 'X64', 'GITHUB_PATH': '/home/runner/work/_temp/_runner_file_commands/add_path_8cec92e8-0445-49f8-bbf9-916b5be6bcb7', 'RUNNER_TOOL_CACHE': '/opt/hostedtoolcache', '_': '/usr/bin/make', 'ANDROID_NDK_ROOT': '/usr/local/lib/android/sdk/ndk/27.1.12297006', 'XDG_RUNTIME_DIR': '/run/user/1001', 'AGENT_TOOLSDIRECTORY': '/opt/hostedtoolcache', 'GITHUB_REPOSITORY': 'galaxyproject/galaxy', 'VCPKG_INSTALLATION_ROOT': '/usr/local/share/vcpkg', 'JOURNAL_STREAM': '8:6153', 'GITHUB_ACTION': '__run_8', 'DEBIAN_FRONTEND': 'noninteractive', 'HOME': '/home/runner', 'GITHUB_GRAPHQL_URL': 'https://api.github.com/graphql', 'GITHUB_WORKFLOW': 'Build docs', 'GOROOT_1_20_X64': '/opt/hostedtoolcache/go/1.20.14/x64', 'GITHUB_RUN_ID': '10954658954', 'HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS': '3650', 'GITHUB_ACTOR': 'mvdbeek', 'ANT_HOME': '/usr/share/ant', 'ImageOS': 'ubuntu22', 'ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE': '/opt/actionarchivecache', 'TARGET_BRANCH': 'release_22.01', 'GITHUB_OUTPUT': '/home/runner/work/_temp/_runner_file_commands/set_output_8cec92e8-0445-49f8-bbf9-916b5be6bcb7', 'GITHUB_BASE_REF': '', 'STATS_V3PS': 'true', 'GITHUB_REPOSITORY_OWNER_ID': '7937847', 'GOROOT_1_22_X64': '/opt/hostedtoolcache/go/1.22.7/x64', 'AZURE_EXTENSION_DIR': '/opt/az/azcliextensions', 'RUNNER_ENVIRONMENT': 'github-hosted', 'STATS_VMFE': 'true', 'HOMEBREW_NO_AUTO_UPDATE': '1', 'JAVA_HOME_21_X64': '/usr/lib/jvm/temurin-21-jdk-amd64', 'MAKELEVEL': '2', 'DOCUTILSCONFIG': '/home/runner/work/galaxy/galaxy/doc/source/docutils.conf'}))[source]¶
galaxy.tool_util.verify.wait module¶
Abstraction for waiting on API conditions to become true.
- galaxy.tool_util.verify.wait.wait_on(function: Callable, desc: str, timeout: Union[int, float], delta: Union[int, float] = 0.25, polling_backoff: Union[int, float] = 0, sleep_: Optional[Callable] = None)[source]¶
Wait for function to return non-None value.
Grow the polling interval (initially
delta
defaulting to 0.25 seconds) incrementally by the suppliedpolling_backoff
(defaulting to 0).Throw a TimeoutAssertionError if the supplied timeout is reached without supplied function ever returning a non-None value.
- exception galaxy.tool_util.verify.wait.TimeoutAssertionError(message)[source]¶
Bases:
AssertionError
Derivative of AssertionError indicating wait_on exceeded max time.