mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-16 15:45:04 +08:00
Also: - Rename `FooBarTestCase` test classes as `TestFooBar`. These were collected by pytest only because they were `unittest.TestCase` derived, but normally pytest collects only test classes whose name starts with `Test`, see https://docs.pytest.org/en/7.1.x/reference/reference.html#confval-python_classes
30 lines
1.2 KiB
Python
30 lines
1.2 KiB
Python
"""Integration tests for chained dynamic job destinations."""
|
|
|
|
import os
|
|
import tempfile
|
|
|
|
from galaxy_test.base.populators import skip_without_tool
|
|
from .test_job_environments import BaseJobEnvironmentIntegrationTestCase
|
|
|
|
SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__))
|
|
CHAINED_DYNDESTS_JOB_CONFIG = os.path.join(SCRIPT_DIRECTORY, "chained_dyndest_job_conf.xml")
|
|
|
|
|
|
class TestChainedDynamicDestinationIntegration(BaseJobEnvironmentIntegrationTestCase):
|
|
@classmethod
|
|
def handle_galaxy_config_kwds(cls, config):
|
|
super().handle_galaxy_config_kwds(config)
|
|
cls.jobs_directory = tempfile.mkdtemp()
|
|
config["jobs_directory"] = cls.jobs_directory
|
|
config["job_config_file"] = CHAINED_DYNDESTS_JOB_CONFIG
|
|
|
|
@skip_without_tool("job_environment_default")
|
|
def test_default_environment_1801(self):
|
|
job_env = self._run_and_get_environment_properties()
|
|
|
|
# Since dynamic destinations compute final tmp_dir parameter to be
|
|
# $(mktemp from1and2and3XXXXXXXXXXXX), tmpdir should start
|
|
# with from1and2and3.
|
|
basename = os.path.basename(job_env.tmp)
|
|
assert basename.startswith("from1and2and3"), job_env.tmp
|