9 lines
272 B
Python
9 lines
272 B
Python
"""pytest 根配置:保证无论从哪个工作目录启动 pytest,均可导入 utils/ 下的两个包。"""
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
_UTILS_DIR = Path(__file__).resolve().parent
|
|
if str(_UTILS_DIR) not in sys.path:
|
|
sys.path.insert(0, str(_UTILS_DIR))
|