File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -95,3 +95,28 @@ def test_project_job(subproc, testdata):
9595 )
9696 jc .project_job ()
9797
98+ def test_singularity_exec_binds_finishdir (testdata ):
99+ """finishdir is automatically added to the --bind list of every singularity exec call."""
100+ jc = Job_Creator (
101+ run_settings = {'input' : '/tmp/' , 'finishdir' : '/tmp/test_runfolder' },
102+ config = preset_config ,
103+ log = logger ,
104+ sampleinfo = testdata ,
105+ )
106+ cmd = jc ._singularity_exec ('blast' , 'blastn -help' )
107+ assert '/tmp/test_runfolder' in cmd
108+
109+
110+ def test_singularity_exec_does_not_duplicate_finishdir (testdata ):
111+ """finishdir is not listed twice when it already appears in config bind_paths."""
112+ config = dict (preset_config )
113+ config ['singularity' ] = dict (preset_config ['singularity' ])
114+ config ['singularity' ]['bind_paths' ] = ['/tmp/test_runfolder' , '/data' ]
115+ jc = Job_Creator (
116+ run_settings = {'input' : '/tmp/' , 'finishdir' : '/tmp/test_runfolder' },
117+ config = config ,
118+ log = logger ,
119+ sampleinfo = testdata ,
120+ )
121+ cmd = jc ._singularity_exec ('blast' , 'blastn -help' )
122+ assert cmd .count ('/tmp/test_runfolder' ) == 1
You can’t perform that action at this time.
0 commit comments