Skip to content

Commit 03c8a74

Browse files
committed
add test for single tool packing
1 parent 7f4bc55 commit 03c8a74

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

tests/test_pack.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ def test_pack():
3939
assert packed == expect_packed
4040

4141

42+
def test_pack_single_tool():
43+
load_tool.loaders = {}
44+
45+
document_loader, workflowobj, uri = fetch_document(
46+
get_data("tests/wf/formattest.cwl"))
47+
document_loader, _, processobj, metadata, uri = validate_document(
48+
document_loader, workflowobj, uri)
49+
50+
packed = cwltool.pack.pack(document_loader, processobj, uri, metadata)
51+
assert "$schemas" in packed
52+
4253
def test_pack_rewrites():
4354
load_tool.loaders = {}
4455
rewrites = {}

tests/wf/formattest.cwl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env cwl-runner
22
$namespaces:
33
edam: "http://edamontology.org/"
4+
$schemas:
5+
- empty.ttl
46
cwlVersion: v1.0
57
class: CommandLineTool
68
doc: "Reverse each line using the `rev` command"
@@ -18,4 +20,4 @@ outputs:
1820
format: edam:format_2330
1921

2022
baseCommand: rev
21-
stdout: output.txt
23+
stdout: output.txt

0 commit comments

Comments
 (0)