File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1414from cwltool .context import LoadingContext , RuntimeContext
1515from cwltool .docker import DockerCommandLineJob
1616from cwltool .job import JobBase
17+ from cwltool .main import main
1718from cwltool .pathmapper import MapperEnt , PathMapper
1819from cwltool .stdfsaccess import StdFsAccess
1920from cwltool .update import INTERNAL_VERSION , ORIGINAL_CWLVERSION
@@ -230,3 +231,20 @@ def test_runtimeContext_respects_tmp_outdir_prefix(tmp_path: Path) -> None:
230231 runtime_context = RuntimeContext ({"tmp_outdir_prefix" : tmpdir_prefix })
231232 assert runtime_context .get_outdir ().startswith (tmpdir_prefix )
232233 assert runtime_context .create_outdir ().startswith (tmpdir_prefix )
234+
235+
236+ def test_remove_tmpdirs (tmp_path : Path ) -> None :
237+ """Test that the tmpdirs are removed after the job execution."""
238+ assert (
239+ main (
240+ [
241+ "--tmpdir-prefix" ,
242+ str (f"{ tmp_path } /" ),
243+ get_data ("tests/wf/hello_single_tool.cwl" ),
244+ "--message" ,
245+ "Hello" ,
246+ ]
247+ )
248+ == 0
249+ )
250+ assert len (list (tmp_path .iterdir ())) == 0
You can’t perform that action at this time.
0 commit comments