Skip to content

adding test: give warning instead of error when default path is not present cwltool Issue #2 #360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tests/test_default_path.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import unittest
from cwltool.load_tool import fetch_document, validate_document
from .util import get_data
from schema_salad.ref_resolver import Loader

class TestDefaultPath(unittest.TestCase):
# Testing that error is not raised when default path is not present
def test_default_path(self):
document_loader, workflowobj, uri = fetch_document(
get_data("tests/wf/default_path.cwl"))
document_loader, avsc_names, processobj, metadata, uri = validate_document(
document_loader, workflowobj, uri)

self.assertIsInstance(document_loader,Loader)
self.assertIn("cwlVersion",processobj)
11 changes: 11 additions & 0 deletions tests/wf/default_path.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cwlVersion: v1.0
class: CommandLineTool
inputs:
- id: "file1"
type: File
default:
class: File
path: default.txt
outputs: []
arguments: [cat, $(inputs.file1.path)]