10 lines
321 B
Python
10 lines
321 B
Python
"""pytest 路径装配:让 tests/ 能直接 import target/ 与 scenarios/ 下的模块。"""
|
|
|
|
import os
|
|
import sys
|
|
|
|
_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
for _d in (os.path.join(_ROOT, "target"), os.path.join(_ROOT, "scenarios")):
|
|
if _d not in sys.path:
|
|
sys.path.insert(0, _d)
|