Files
galaxy/test/integration/test_chained_dynamic_destinations.py
T
John Chilton 45019c3fbd Move galaxy testing utilities into more sane package structure.
Split test/base into lib/galaxy_test/base and lib/galaxy_test/driver. Dividing things on whether they import galaxy-app code or not - with the goal of a galaxy-test-base package that doesn't depend on galaxy-app and a galaxy-test-driver package that does.

I've been refactoring around this division for a long time. Certain tests (namely the integration tests) always need to bootstrap Galaxy - but the API tests and the Selenium tests should be installable and runnable without Galaxy in the Python environment. So future galaxy-test-api and galaxy-test-selenium packages should have only an optional dependency on galaxy-test-driver.

Properly sturcturing these namespaces is a precursor for real packages on PyPI, clean separation of the tool shed testing code, and cleans up all the flake8 noqa hacks in test/.
2019-11-12 09:03:06 -05:00

32 lines
1.1 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 ChainedDynamicDestinationIntegrationTestCase(BaseJobEnvironmentIntegrationTestCase):
@classmethod
def handle_galaxy_config_kwds(cls, 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