18 lines
643 B
Python
18 lines
643 B
Python
"""labs:所有试验与测试代码。
|
||
|
||
本目录**不属于运行时代码**,只放回测/审计/基准/测试。里面的脚本需要
|
||
``py-client`` 在 ``sys.path`` 上才能 import ``config`` / ``libs`` / ``sdk`` / ``strategy``,
|
||
这里统一补一次,保证从仓库根目录也能直接跑:
|
||
|
||
py -3.14 -B -m unittest discover -s labs/tests
|
||
py -3.14 -B labs/analysis/etf/run.py
|
||
py -3.14 -B labs/benchmarks/hotpaths.py
|
||
"""
|
||
|
||
import sys
|
||
from pathlib import Path
|
||
|
||
PY_CLIENT = Path(__file__).resolve().parents[1] / "py-client"
|
||
if PY_CLIENT.is_dir() and str(PY_CLIENT) not in sys.path:
|
||
sys.path.insert(0, str(PY_CLIENT))
|