Skip to content

Commit

Permalink
Improve failure message in test utility code.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Jan 13, 2023
1 parent 58d3d62 commit 27db031
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python/lsst/pipe/base/tests/pipelineStepTester.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ def run(self, butler: Butler, test_case: unittest.TestCase) -> None:
all_outputs.update(dataset_types.intermediates.asMapping())

for name in dataset_types.inputs.names & all_outputs.keys():
test_case.assertTrue(all_outputs[name].is_compatible_with(dataset_types.inputs[name]))
test_case.assertTrue(
all_outputs[name].is_compatible_with(dataset_types.inputs[name]),
msg=(
f"dataset type {name} is defined as {dataset_types.inputs[name]} as an "
f"input, but {all_outputs[name]} as an output, and these are not compatible."
),
)

for dataset_type in dataset_types.outputs | dataset_types.intermediates:
if not dataset_type.isComponent():
Expand Down

0 comments on commit 27db031

Please sign in to comment.