Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/cwltool/tests/test_dependencies.py @ 5:9b1c78e6ba9c draft default tip
"planemo upload commit 6c0a8142489327ece472c84e558c47da711a9142"
| author | shellac |
|---|---|
| date | Mon, 01 Jun 2020 08:59:25 -0400 |
| parents | 79f47841a781 |
| children |
comparison
equal
deleted
inserted
replaced
| 4:79f47841a781 | 5:9b1c78e6ba9c |
|---|---|
| 1 import pytest | |
| 2 | |
| 3 import pytest | |
| 4 | |
| 5 from cwltool.utils import onWindows | |
| 6 | |
| 7 from .util import get_data, get_main_output, needs_docker | |
| 8 | |
| 9 | |
| 10 try: | |
| 11 from galaxy.tools import deps | |
| 12 except ImportError: | |
| 13 deps = None | |
| 14 | |
| 15 @needs_docker | |
| 16 @pytest.mark.skipif(not deps, reason="galaxy-lib is not installed") | |
| 17 def test_biocontainers(): | |
| 18 wflow = get_data("tests/seqtk_seq.cwl") | |
| 19 job = get_data("tests/seqtk_seq_job.json") | |
| 20 error_code, _, _ = get_main_output( | |
| 21 ["--beta-use-biocontainers", wflow, job]) | |
| 22 | |
| 23 assert error_code == 0 | |
| 24 | |
| 25 @pytest.mark.skipif(onWindows(), reason="bioconda currently not working on MS Windows") | |
| 26 @pytest.mark.skipif(not deps, reason="galaxy-lib is not installed") | |
| 27 def test_bioconda(): | |
| 28 wflow = get_data("tests/seqtk_seq.cwl") | |
| 29 job = get_data("tests/seqtk_seq_job.json") | |
| 30 error_code, _, stderr = get_main_output( | |
| 31 ["--beta-conda-dependencies", "--debug", wflow, job]) | |
| 32 | |
| 33 assert error_code == 0, stderr | |
| 34 | |
| 35 import os | |
| 36 from distutils import spawn | |
| 37 @pytest.mark.skipif(not spawn.find_executable("modulecmd"), reason="modulecmd not installed") | |
| 38 def test_modules(): | |
| 39 wflow = get_data("tests/random_lines.cwl") | |
| 40 job = get_data("tests/random_lines_job.json") | |
| 41 os.environ["MODULEPATH"] = os.path.join(os.getcwd(), 'tests/test_deps_env/modulefiles') | |
| 42 error_code, _, stderr = get_main_output( | |
| 43 ["--beta-dependency-resolvers-configuration", | |
| 44 "tests/test_deps_env_modules_resolvers_conf.yml", "--debug", wflow, job]) | |
| 45 | |
| 46 assert error_code == 0, stderr |
