@@ -1188,7 +1188,7 @@ def test_cid_file_w_prefix(tmp_path: Path, factor: str) -> None:
11881188
11891189@needs_docker
11901190@pytest .mark .parametrize ("factor" , test_factors )
1191- def test_secondary_files_v1_1 (factor : str ) -> None :
1191+ def test_secondary_files_v1_1 (factor : str , tmp_path : Path ) -> None :
11921192 test_file = "secondary-files.cwl"
11931193 test_job_file = "secondary-files-job.yml"
11941194 try :
@@ -1197,14 +1197,16 @@ def test_secondary_files_v1_1(factor: str) -> None:
11971197 commands .extend (
11981198 [
11991199 "--debug" ,
1200+ "--outdir" ,
1201+ str (tmp_path ),
12001202 get_data (os .path .join ("tests" , test_file )),
12011203 get_data (os .path .join ("tests" , test_job_file )),
12021204 ]
12031205 )
12041206 error_code , _ , stderr = get_main_output (commands )
12051207 finally :
12061208 # 664 in octal, '-rw-rw-r--'
1207- assert stat .S_IMODE (os .stat ("lsout" ).st_mode ) == 436
1209+ assert stat .S_IMODE (os .stat (tmp_path / "lsout" ).st_mode ) == 436
12081210 os .umask (old_umask ) # revert back to original umask
12091211 stderr = re .sub (r"\s\s+" , " " , stderr )
12101212 assert "completed success" in stderr
@@ -1213,13 +1215,15 @@ def test_secondary_files_v1_1(factor: str) -> None:
12131215
12141216@needs_docker
12151217@pytest .mark .parametrize ("factor" , test_factors )
1216- def test_secondary_files_bad_v1_1 (factor : str ) -> None :
1218+ def test_secondary_files_bad_v1_1 (factor : str , tmp_path : Path ) -> None :
12171219 """Affirm the correct error message for a bad secondaryFiles expression."""
12181220 test_file = "secondary-files-bad.cwl"
12191221 test_job_file = "secondary-files-job.yml"
12201222 commands = factor .split ()
12211223 commands .extend (
12221224 [
1225+ "--outdir" ,
1226+ str (tmp_path ),
12231227 get_data (os .path .join ("tests" , test_file )),
12241228 get_data (os .path .join ("tests" , test_job_file )),
12251229 ]
@@ -1706,10 +1710,10 @@ def test_record_default_with_long() -> None:
17061710 )
17071711
17081712
1709- def test_record_outputeval () -> None :
1713+ def test_record_outputeval (tmp_path : Path ) -> None :
17101714 """Confirm that record types can be populated from outputEval."""
17111715 tool_path = get_data ("tests/wf/record_outputeval.cwl" )
1712- err_code , stdout , stderr = get_main_output ([tool_path ])
1716+ err_code , stdout , stderr = get_main_output (["--outdir" , str ( tmp_path ), tool_path ])
17131717 assert err_code == 0
17141718 result = json .loads (stdout )["references" ]
17151719 assert "genome_fa" in result
0 commit comments