Files
cultivation-world-simulator/tests/conftest.py
2025-08-20 01:18:04 +08:00

10 lines
241 B
Python

import os
import sys
# 将项目根目录加入 Python 路径,确保可以导入 `src` 包
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
if PROJECT_ROOT not in sys.path:
sys.path.insert(0, PROJECT_ROOT)