refactor: 优化 CoreDriver 实现并增强代码可读性

- 优化 部分核心功能实现。
- 新增 详细的文档字符串(Docstrings)和注释。
- 移除 代码中的冗余注释和无效代码。
This commit is contained in:
2026-01-22 15:39:20 +08:00
parent 1bcad0d166
commit 2e98252e34
5 changed files with 266 additions and 87 deletions

View File

@@ -8,7 +8,8 @@ import pytest
from core.settings import LOG_SOURCE, LOG_BACKUP_DIR, ALLURE_TEMP, REPORT_DIR
# netstat -ano | findstr :4723
# taskkill /PID 12345 /F
# 日志自动清理
def _clean_old_logs(backup_dir, keep_count=10):
files = sorted(Path(backup_dir).glob("pytest_*.log"), key=os.path.getmtime)