-
-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
feeb0be
commit 23c5ce0
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"""Test the loadContents feature.""" | ||
import json | ||
from pathlib import Path | ||
|
||
from cwltool.main import main | ||
|
||
from .util import get_data | ||
|
||
|
||
def test_load_contents_file_array(tmp_path: Path) -> None: | ||
"""Ensures that a File[] input with loadContents loads each file.""" | ||
params = [ | ||
"--outdir", str(tmp_path), | ||
get_data("tests/load_contents-array.cwl"), | ||
"tests/load_contents-array.yml", | ||
] | ||
assert main(params) == 0 | ||
with open(tmp_path / "data.json") as out_fd: | ||
data = json.load(out_fd) | ||
assert data == {"data": [1, 2]} |