From 8ba6790bf459b973d58c8870449750dee2190f00 Mon Sep 17 00:00:00 2001 From: yuxuan-ms Date: Thu, 13 Jun 2024 14:18:57 +0800 Subject: [PATCH] Fix failed testcase. --- testplan/testing/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testplan/testing/base.py b/testplan/testing/base.py index 91bfb913c..7412daeb1 100644 --- a/testplan/testing/base.py +++ b/testplan/testing/base.py @@ -694,6 +694,7 @@ def _run_resource_hook( testcase_name=hook_name, testcase_report=case_report, ) + case_report.pass_if_empty() try: interface.check_signature(hook, ["env", "result"]) hook_args = (runtime_env, case_result) @@ -709,7 +710,6 @@ def _run_resource_hook( if self.get_stdout_style(case_report.passed).display_testcase: self.log_testcase_status(case_report) - case_report.pass_if_empty() pattern = ":".join([self.name, suite_name, hook_name]) self._xfail(pattern, case_report) case_report.runtime_status = RuntimeStatus.FINISHED