From ab957574e2f237663f207bbc88d49213b8f2e13e Mon Sep 17 00:00:00 2001 From: Anil Sorathiya Date: Wed, 16 Apr 2025 11:57:49 -0400 Subject: [PATCH] customize title for test --- validmind/tests/run.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/validmind/tests/run.py b/validmind/tests/run.py index 09fed2a16..2a32a3a81 100644 --- a/validmind/tests/run.py +++ b/validmind/tests/run.py @@ -269,7 +269,12 @@ def _run_comparison_test( ) -def _run_test(test_id: TestID, inputs: Dict[str, Any], params: Dict[str, Any]): +def _run_test( + test_id: TestID, + inputs: Dict[str, Any], + params: Dict[str, Any], + title: Optional[str] = None, +): """Run a standard test and return a TestResult object""" test_func = load_test(test_id) input_kwargs, param_kwargs = _get_test_kwargs( @@ -286,6 +291,7 @@ def _run_test(test_id: TestID, inputs: Dict[str, Any], params: Dict[str, Any]): test_doc=getdoc(test_func), inputs=input_kwargs, params=param_kwargs, + title=title, ) @@ -382,7 +388,7 @@ def run_test( # noqa: C901 ) else: - result = _run_test(test_id, inputs, params) + result = _run_test(test_id, inputs, params, title) end_time = time.perf_counter() result.metadata = _get_run_metadata(duration_seconds=end_time - start_time)