From 27db0313c93c9e77e621437a805f349cd7ed68a0 Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Wed, 21 Dec 2022 12:34:23 -0500 Subject: [PATCH] Improve failure message in test utility code. --- python/lsst/pipe/base/tests/pipelineStepTester.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/lsst/pipe/base/tests/pipelineStepTester.py b/python/lsst/pipe/base/tests/pipelineStepTester.py index ea82de48e..697ccac7f 100644 --- a/python/lsst/pipe/base/tests/pipelineStepTester.py +++ b/python/lsst/pipe/base/tests/pipelineStepTester.py @@ -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():