mock_task_defs¶
- lsst.pipe.base.tests.mocks.mock_task_defs(originals: Iterable[TaskDef], unmocked_dataset_types: Iterable[str] = (), force_failures: Mapping[str, tuple[str, type[Exception] | None]] | None = None) list[lsst.pipe.base.pipeline.TaskDef] ¶
Create mocks for an iterable of TaskDefs.
- Parameters:
- originals
Iterable
[TaskDef
] Original tasks and configuration to mock.
- unmocked_dataset_types
Iterable
[str
], optional Names of overall-input dataset types that should not be replaced with mocks.
- force_failures
Mapping
[str
,tuple
[str
,type
[Exception
] orNone
] ] Mapping from original task label to a 2-tuple indicating that some quanta should raise an exception when executed. The first entry is a data ID match using the butler expression language (i.e. a string of the sort passed ass the
where
argument to butler query methods), while the second is the type of exception to raise when the quantum data ID matches the expression. An exception type ofNone
uses the default,ValueError
.
- originals
- Returns:
- mocked
list
[TaskDef
] List of
TaskDef
objects usingMockPipelineTask
configurations that target the original tasks, in the same order.
- mocked