Files
galaxy/test/integration/test_galaxy_interactor.py
T
Nicola Soranzo 30f60493c3 Format Python code with black 23.1.0
with manual fixes to 3 files to make them compatible with black 22.12.0 .

We need to keep black pinned at `<23` until we vendorise `packaging`, since
the new version of black depends on `packaging >=22.0` which is the version
where `LegacyVersion` (which we use for tool lineages) was removed.
2023-02-01 23:51:03 +00:00

37 lines
1.5 KiB
Python

"""Integration tests for GalaxyInteractor."""
from packaging.version import Version
from galaxy_test.driver import integration_util
class TestGalaxyInteractor(integration_util.IntegrationTestCase):
framework_tool_and_types = True
def test_local_test_data_download(self):
self.galaxy_interactor._target_galaxy_version = Version("18.09")
assert self.galaxy_interactor.supports_test_data_download is False
assert self.galaxy_interactor.test_data_download(tool_id="cat1", filename="1.bed").startswith(
b"chr1\t147962192\t147962580"
)
def test_run_test_select_version(self):
self._run_tool_test(tool_id="multiple_versions", tool_version="0.1")
def test_get_tool_tests(self):
# test that get_tool_tests will return the right tests when the tool_version has a '+' in it
test_data = self.galaxy_interactor.get_tool_tests(tool_id="multiple_versions", tool_version="0.1+galaxy6")
assert isinstance(test_data, list)
assert len(test_data) > 0
test_data_dict = test_data[0]
assert isinstance(test_data_dict, dict)
assert test_data_dict.get("tool_version") == "0.1+galaxy6"
test_data = self.galaxy_interactor.get_tool_tests(
tool_id="multiple_versions"
) # test that tool_version=None does not break it
assert isinstance(test_data, list)
assert len(test_data) > 0
test_data_dict = test_data[0]
assert isinstance(test_data_dict, dict)