Skip to content

Commit 4f0da09

Browse files
author
Dennis Kennetz
committed
execute singularity pullfolder search before local image is created.
1 parent 5d0d4de commit 4f0da09

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

tests/test_singularity.py

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,9 @@ def test_singularity_incorrect_image_pull():
4040
get_data("tests/wf/hello-workflow.cwl"), "--usermessage", "hello"])
4141
assert result_code != 0
4242

43-
@needs_singularity
44-
def test_singularity_local(tmp_path):
45-
workdir = tmp_path / "working_dir"
46-
workdir.mkdir()
47-
os.chdir(str(workdir))
48-
result_code, stdout, stderr = get_main_output(
49-
['--singularity', get_data("tests/sing_pullfolder_test.cwl"), "--message", "hello"])
50-
file_in_dir = os.listdir(os.getcwd())
51-
assert result_code == 0
52-
5343
@needs_singularity
5444
def test_singularity_pullfolder(tmp_path):
55-
workdir = tmp_path / "working_dir"
45+
workdir = tmp_path / "working_dir_new"
5646
workdir.mkdir()
5747
os.chdir(str(workdir))
5848
pull_folder = tmp_path / "pull_folder"
@@ -66,16 +56,12 @@ def test_singularity_pullfolder(tmp_path):
6656
assert result_code != 0
6757

6858
@needs_singularity
69-
def test_singularity_pullfolder_in_env(tmp_path):
70-
os.environ["SINGULARITY_PULLFOLDER"] = str(os.getcwd())
71-
os.environ["SINGULARITY_CACHEDIR"] = str(os.getcwd())
59+
def test_singularity_local(tmp_path):
7260
workdir = tmp_path / "working_dir"
7361
workdir.mkdir()
7462
os.chdir(str(workdir))
7563
result_code, stdout, stderr = get_main_output(
7664
['--singularity', get_data("tests/sing_pullfolder_test.cwl"), "--message", "hello"])
77-
for env in ("SINGULARITY_PULLFOLDER", "SINGULARITY_CACHEDIR"):
78-
if env in os.environ:
79-
assert result_code == 0
80-
else:
81-
assert result_code != 0
65+
file_in_dir = os.listdir(os.getcwd())
66+
assert result_code == 0
67+

0 commit comments

Comments
 (0)