Skip to content

Commit a2045cb

Browse files
author
Vasu Jaganath
committed
modify test2D to automate file creation
1 parent f201b2a commit a2045cb

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

cwltool/command_line_tool.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,9 @@ def recursively_insert(j_dict: Any, key: Any, val: Any) -> Any:
15041504
if j_dict.get("class") == "File":
15051505
j_dict[key] = val
15061506
else:
1507-
return {x: recursively_insert(y, key, val) for x, y in j_dict.items()}
1507+
return {
1508+
x: recursively_insert(y, key, val) for x, y in j_dict.items()
1509+
}
15081510
return j_dict
15091511

15101512
result = recursively_insert(result, "format", format_field)

tests/test_2D.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
import subprocess
22
import sys
3+
from pathlib import Path
34

45
from .util import get_data
56

67

78
def test_output_2D_file_format() -> None:
89
"""Test format tag for 2D output arrays."""
910

11+
Path("filename.txt").touch()
1012
params = [
1113
sys.executable,
1214
"-m",
1315
"cwltool",
16+
"--cachedir", # just so that the relative path of file works out
17+
"foo",
1418
get_data("tests/output_2D_file_format.cwl"),
1519
]
1620

0 commit comments

Comments
 (0)