Skip to content

Commit

Permalink
修复 --rerun 为 0 是报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mikigo committed Oct 22, 2024
1 parent 3c8b282 commit b274b27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pms/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def write_case_result(item, report):
with open(abs_json_file_path, "r", encoding="utf-8") as _f:
case_res_from_json = json.load(_f)

if item.execution_count >= 2:
if hasattr(item, "execution_count") and item.execution_count >= 2:
if (
case_res_from_json.get("result") == "fail"
and case_result_tpl["result"] == "pass"
Expand Down

0 comments on commit b274b27

Please sign in to comment.