Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cwltool/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def __init__(self, kwargs: Optional[Dict[str, Any]] = None) -> None:
self.basedir = "" # type: str
self.toplevel = False # type: bool
self.mutation_manager = None # type: Optional[MutationManager]
self.make_fs_access = StdFsAccess # type: Callable[[str], StdFsAccess]
self.make_fs_access = StdFsAccess
self.path_mapper = PathMapper
self.builder = None # type: Optional[Builder]
self.docker_outdir = "" # type: str
Expand Down
4 changes: 4 additions & 0 deletions cwltool/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,10 @@ def job(
) -> JobsGeneratorType:
pass

def __str__(self) -> str:
"""Return the id of this CWL process."""
return f"{type(self).__name__}: {self.tool['id']}"


_names = set() # type: Set[str]

Expand Down
24 changes: 24 additions & 0 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -1574,3 +1574,27 @@ def test_custom_type_in_step_process() -> None:
]
)
assert err_code == 0


def test_expression_tool_class() -> None:
"""Confirm properties of the ExpressionTool class."""
factory = cwltool.factory.Factory()
tool_path = get_data("tests/wf/parseInt-tool.cwl")
expression_tool = factory.make(tool_path).t
assert str(expression_tool) == f"ExpressionTool: file://{tool_path}"


def test_operation_class() -> None:
"""Confirm properties of the AbstractOperation class."""
factory = cwltool.factory.Factory()
tool_path = get_data("tests/wf/operation/abstract-cosifer.cwl")
expression_tool = factory.make(tool_path).t
assert str(expression_tool) == f"AbstractOperation: file://{tool_path}"


def test_command_line_tool_class() -> None:
"""Confirm properties of the CommandLineTool class."""
factory = cwltool.factory.Factory()
tool_path = get_data("tests/echo.cwl")
expression_tool = factory.make(tool_path).t
assert str(expression_tool) == f"CommandLineTool: file://{tool_path}"