diff --git a/internal/tests/pytests/conftest.py b/internal/tests/pytests/conftest.py index 795a45f80..299410036 100644 --- a/internal/tests/pytests/conftest.py +++ b/internal/tests/pytests/conftest.py @@ -103,7 +103,15 @@ def test_example(metplus_config): config.logger = mock.MagicMock() yield config - + + if config.logger.error.call_args_list: + err_msgs = [ + str(msg.args[0]) + for msg + in config.logger.error.call_args_list + if len(msg.args) != 0] + print("Tests raised the following errors:") + print("\n".join(err_msgs)) config.logger = old_logger # don't remove output base if test fails if request.node.rep_call.failed: