Skip to content

Commit 6e01be1

Browse files
authored
Merge pull request #360 from kapilkd13/defaultcheck
adding test: give warning instead of error when default path is not present cwltool Issue #2
2 parents ae05653 + 7b53812 commit 6e01be1

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

tests/test_default_path.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import unittest
2+
from cwltool.load_tool import fetch_document, validate_document
3+
from .util import get_data
4+
from schema_salad.ref_resolver import Loader
5+
6+
class TestDefaultPath(unittest.TestCase):
7+
# Testing that error is not raised when default path is not present
8+
def test_default_path(self):
9+
document_loader, workflowobj, uri = fetch_document(
10+
get_data("tests/wf/default_path.cwl"))
11+
document_loader, avsc_names, processobj, metadata, uri = validate_document(
12+
document_loader, workflowobj, uri)
13+
14+
self.assertIsInstance(document_loader,Loader)
15+
self.assertIn("cwlVersion",processobj)

tests/wf/default_path.cwl

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cwlVersion: v1.0
2+
class: CommandLineTool
3+
inputs:
4+
- id: "file1"
5+
type: File
6+
default:
7+
class: File
8+
path: default.txt
9+
outputs: []
10+
arguments: [cat, $(inputs.file1.path)]
11+

0 commit comments

Comments
 (0)