Files
galaxy/test/integration/test_chained_dynamic_destinations.py
T
Nicola Soranzo c35d8f2a06 Replace `unittest.TestCase` with pytest-based partial re-implementation
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
2022-09-27 03:34:58 +01:00

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