def test_meta_scalar(self): w = Workflow("meta_scalar", meta=Meta(arbitrary_scalar=42)) expected = """\ workflow meta_scalar { meta { arbitrary_scalar: 42 } }""" derived_workflow_only = "".join( w.get_string().splitlines(keepends=True)[4:]) self.assertEqual(expected, derived_workflow_only)
def test_meta_string(self): w = Workflow("meta_string", meta=Meta(author="illusional")) expected = """\ workflow meta_string { meta { author: "illusional" } }""" derived_workflow_only = "".join( w.get_string().splitlines(keepends=True)[4:]) self.assertEqual(expected, derived_workflow_only)
def test_meta_bool(self): w = Workflow("meta_scalar", meta=Meta(pos=True, neg=False)) expected = """\ workflow meta_scalar { meta { pos: true neg: false } }""" derived_task_only = "".join( w.get_string().splitlines(keepends=True)[4:]) self.assertEqual(expected, derived_task_only)