- 新增 unittest tests 基座,覆盖 appconfig 与 db 纯逻辑 - 增加 excel/prompts 未实现模块的契约占位测试 - 补强 config.json 对 *_token 与 *_password 的敏感字段拦截 - 更新任务看板、当前状态、API 合约和进度记录
20 lines
454 B
Python
20 lines
454 B
Python
"""Shared unittest helpers."""
|
|
|
|
import os
|
|
import sys
|
|
import tempfile
|
|
from pathlib import Path
|
|
|
|
|
|
REPO_ROOT = Path(__file__).resolve().parents[1]
|
|
if str(REPO_ROOT) not in sys.path:
|
|
sys.path.insert(0, str(REPO_ROOT))
|
|
|
|
|
|
class TempDirMixin:
|
|
def make_temp_dir(self):
|
|
return tempfile.TemporaryDirectory(prefix="cmshopee_test_", dir=Path(__file__).parent)
|
|
|
|
def assert_removed(self, path):
|
|
self.assertFalse(os.path.exists(path), path)
|