polaris.Task.add_step
- Task.add_step(step=None, subdir=None, symlink=None, run_by_default=True)[source]
Add a step to the task and component (if not already present)
- Parameters:
step (polaris.Step, optional) – The step to add if adding by Step object, not subdirectory
subdir (str, optional) – The subdirectory of the step within this task’s component if you wish to add the step by path, and it has already been added to that component. A step from another component has to be added by
step.symlink (str, optional) –
A location for a symlink to the step, relative to the test case’s work directory. This is typically used for a shared step that lives outside of the test case.
A symlink that would land in the directory that already holds the step is dropped, since it would sit beside what it points to and only add a second name for it. A
get_*_steps()helper suggests one symlink name per step for consumers whose tasks live elsewhere in the tree, and a task that lives in the steps’ own directory can pass those through without having to filter them. A symlink to a step nested deeper under the task is kept: surfacing it under a descriptive name is what symlinks are for.run_by_default (bool, optional) – Whether to add this step to the list of steps to run when the
run()method gets called. Ifrun_by_default=False, users would need to run this step manually.