def test_inputs_generator_secondary_files(self): w = WorkflowBuilder("tst") w.input("wsec", TestTypeWithSecondary, default="test.ext") # w._add_input(Input("wsec", TestTypeWithSecondary(), value="test.ext")) inpsdict = WdlTranslator().build_inputs_file(w, merge_resources=False) self.assertEqual("test.ext", inpsdict.get("tst.wsec")) self.assertEqual("test.txt", inpsdict.get("tst.wsec_txt"))
def test_inputs_generator_array_of_secondary_files(self): w = WorkflowBuilder("tst") w.input("wsec", Array(TestTypeWithSecondary()), default=["test.ext"]) inpsdict = WdlTranslator().build_inputs_file(w, merge_resources=False) self.assertListEqual(["test.ext"], inpsdict.get("tst.wsec")) self.assertListEqual(["test.txt"], inpsdict.get("tst.wsec_txt"))