Skip to content

Commit 25ef7c2

Browse files
committed
add to test to catch future regressions in --beta-use-biocontainers.
1 parent 0771b99 commit 25ef7c2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/test_dependencies.py

+15
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
import pytest
99

10+
from cwltool.context import LoadingContext
11+
from cwltool.load_tool import load_tool
12+
from cwltool.software_requirements import get_container_from_software_requirements
13+
1014
from .util import get_data, get_main_output, get_tool_env, needs_docker
1115

1216
deps = None # type: Optional[ModuleType]
@@ -28,6 +32,17 @@ def test_biocontainers(tmp_path: Path) -> None:
2832
assert error_code == 0
2933

3034

35+
@needs_docker
36+
@pytest.mark.skipif(not deps, reason="galaxy-tool-util is not installed")
37+
def test_biocontainers_resolution(tmp_path: Path) -> None:
38+
"""Confirm expected container name for --beta-use-biocontainers."""
39+
tool = load_tool(get_data("tests/seqtk_seq.cwl"), LoadingContext())
40+
assert (
41+
get_container_from_software_requirements(True, tool)
42+
== "quay.io/biocontainers/seqtk:r93--0"
43+
)
44+
45+
3146
@pytest.mark.skipif(not deps, reason="galaxy-tool-util is not installed")
3247
def test_bioconda(tmp_path: Path) -> None:
3348
wflow = get_data("tests/seqtk_seq.cwl")

0 commit comments

Comments
 (0)