Skip to content

Commit 7feeb89

Browse files
test: add assertion to inspect image
1 parent 186ee9a commit 7feeb89

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_singularity.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import pytest
77

88
from cwltool.main import main
9+
from cwltool.singularity import _inspect_singularity_image
910

1011
from .util import (
1112
get_data,
@@ -178,8 +179,13 @@ def test_singularity_local_sandbox_image(tmp_path: Path):
178179
container_path / "alpine",
179180
"docker://alpine:latest",
180181
]
182+
181183
build = subprocess.run(cmd, capture_output=True, text=True)
182184
if build.returncode == 0:
185+
# Verify the path is a container image
186+
res_inspect = _inspect_singularity_image(container_path / "alpine")
187+
assert res_inspect is True
188+
183189
result_code, stdout, stderr = get_main_output(
184190
[
185191
"--singularity",

0 commit comments

Comments
 (0)