Skip to content

Commit 5118697

Browse files
author
Dennis Kennetz
committed
Last Travis failed singularity_local test. Added similar code to yours
1 parent fac18d9 commit 5118697

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/test_singularity.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,14 @@ def test_singularity_incorrect_image_pull():
4141
assert result_code != 0
4242

4343
@needs_singularity
44-
def test_singularity_local():
45-
result_code, _, stderr = get_main_output(
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(
4649
['--singularity', get_data("tests/sing_pullfolder_test.cwl"), "--message", "hello"])
4750
file_in_dir = os.listdir(os.getcwd())
48-
assert 'debian.img' in file_in_dir
51+
assert 'debian.img' in file_in_dir, stderr
4952

5053
@needs_singularity
5154
def test_singularity_pullfolder(tmp_path):

0 commit comments

Comments
 (0)