Skip to content

Commit 67cebb0

Browse files
author
Dennis Kennetz
committed
I think the reason code cov is not increasing is because the image is there when the test runs. I moved the test to the top.
1 parent 4f0da09 commit 67cebb0

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

tests/test_singularity.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@
1414
sys.argv = ['']
1515

1616

17+
@needs_singularity
18+
def test_singularity_pullfolder(tmp_path):
19+
workdir = tmp_path / "working_dir_new"
20+
workdir.mkdir()
21+
os.chdir(str(workdir))
22+
pull_folder = tmp_path / "pull_folder"
23+
pull_folder.mkdir()
24+
os.environ["SINGULARITY_PULLFOLDER"] = str(pull_folder)
25+
if "SINGULARITY_PULLFOLDER" in os.environ:
26+
result_code, stdout, stderr = get_main_output(
27+
['--singularity', get_data("tests/sing_pullfolder_test.cwl"), "--message", "hello"])
28+
assert result_code == 0
29+
else:
30+
assert result_code != 0
31+
1732
@needs_singularity
1833
def test_singularity_workflow(tmpdir):
1934
with working_directory(str(tmpdir)):
@@ -40,21 +55,6 @@ def test_singularity_incorrect_image_pull():
4055
get_data("tests/wf/hello-workflow.cwl"), "--usermessage", "hello"])
4156
assert result_code != 0
4257

43-
@needs_singularity
44-
def test_singularity_pullfolder(tmp_path):
45-
workdir = tmp_path / "working_dir_new"
46-
workdir.mkdir()
47-
os.chdir(str(workdir))
48-
pull_folder = tmp_path / "pull_folder"
49-
pull_folder.mkdir()
50-
os.environ["SINGULARITY_PULLFOLDER"] = str(pull_folder)
51-
if "SINGULARITY_PULLFOLDER" in os.environ:
52-
result_code, stdout, stderr = get_main_output(
53-
['--singularity', get_data("tests/sing_pullfolder_test.cwl"), "--message", "hello"])
54-
assert result_code == 0
55-
else:
56-
assert result_code != 0
57-
5858
@needs_singularity
5959
def test_singularity_local(tmp_path):
6060
workdir = tmp_path / "working_dir"

0 commit comments

Comments
 (0)