mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-24 04:19:48 +01:00
11 lines
No EOL
394 B
Python
11 lines
No EOL
394 B
Python
"""Pytest configuration — must run BEFORE any test imports project modules.
|
|
|
|
Adds the xiaozhi-server directory to sys.path so the existing implicit
|
|
relative imports (`from core.utils.textUtils import ...`) resolve.
|
|
"""
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
_PROJECT_ROOT = Path(__file__).resolve().parent.parent
|
|
if str(_PROJECT_ROOT) not in sys.path:
|
|
sys.path.insert(0, str(_PROJECT_ROOT)) |