Skip to content
This repository was archived by the owner on Jun 9, 2020. It is now read-only.

Commit d813f22

Browse files
committed
Adds class for SubworkflowFeatureRequirement
1 parent ab021ee commit d813f22

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

cwlgen/__init__.py

+9
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,15 @@ def _to_dict(self):
377377
return {p: v for p, v in vars(self).items() if p.startswith('docker') and v is not None}
378378

379379

380+
class SubworkflowFeatureRequirement(Requirement):
381+
382+
def __init__(self):
383+
Requirement.__init__(self, 'SubworkflowFeatureRequirement')
384+
385+
def _to_dict(self):
386+
return dict()
387+
388+
380389
class Namespaces(object):
381390
"""
382391
Define different namespace for the description.

test/test_unit_cwlgen.py

+11
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,17 @@ def test_export(self):
215215
dockerImageId='id', dockerOutputDir='dir')
216216

217217

218+
class TestSubworkflowFeatureRequirement(unittest.TestCase):
219+
220+
def setUp(self):
221+
self.req = cwlgen.SubworkflowFeatureRequirement()
222+
223+
def test_add(self):
224+
tool = {}
225+
self.req.add(tool)
226+
self.assertEqual(tool, {'SubworkflowFeatureRequirement': {}})
227+
228+
218229
########### Main ###########
219230

220231
if __name__ == "__main__":

0 commit comments

Comments
 (0)