def test__get_tool_path_raises(self, mock_mkdtemp): self.setup_mkdtemp(mock_mkdtemp) self.workflow_version.workflow_type = 'other' loader = BespinWorkflowLoader(self.workflow_version) with self.assertRaises(InvalidWorkflowFileException) as context: tool_path = loader._get_tool_path() self.assertIn('Workflow type other is not supported', str(context.exception))
def test__get_tool_path_zipped(self, mock_mkdtemp): self.setup_mkdtemp(mock_mkdtemp) loader = BespinWorkflowLoader(self.zipped_workflow_version) tool_path = loader._get_tool_path() self.assertEqual(tool_path, '/tmpdir/unzipped/workflow.cwl')
def test__get_tool_path_direct(self, mock_mkdtemp): self.setup_mkdtemp(mock_mkdtemp) loader = BespinWorkflowLoader(self.direct_workflow_version) tool_path = loader._get_tool_path() self.assertEqual(tool_path, 'file:///direct/direct.cwl')
def test__get_tool_path_packed(self, mock_mkdtemp): self.setup_mkdtemp(mock_mkdtemp) loader = BespinWorkflowLoader(self.packed_workflow_version) tool_path = loader._get_tool_path() self.assertEqual(tool_path, '/tmpdir/packed.cwl#main')