Esempio n. 1
0
    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)
Esempio n. 2
0
    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)
Esempio n. 3
0
    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)