diff --git a/tests/cross_end/pages/admin/freight_accounting_page.py b/tests/cross_end/pages/admin/freight_accounting_page.py index 51aee74..df8e71e 100644 --- a/tests/cross_end/pages/admin/freight_accounting_page.py +++ b/tests/cross_end/pages/admin/freight_accounting_page.py @@ -139,7 +139,10 @@ class FreightAccountingPage(BasePage): # 无数据 → 执行 SQL 重试 if not self._table_has_data(): if retry_sql: - retry_sql() + try: + retry_sql() + except Exception as e: + raise RuntimeError(f"运费核算 SQL 重试失败!单号: {order_no}, 错误: {e}") self._fill_order_no(order_no) self._click_search()