将 web/services/runtime.py 拆为 runtime/ 子模块并保持门面兼容;补齐 ESS 文档、门面/契约/TF_DF 测试与 CODE_REVIEW Approve。 Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
695 B
Python
24 lines
695 B
Python
"""ECR-002:TF_DF 全量 __init__ 冒烟(CODE_REVIEW ECR-001 Finding 5)。"""
|
||
from __future__ import annotations
|
||
|
||
import sys
|
||
from pathlib import Path
|
||
|
||
ROOT = Path(__file__).resolve().parents[1]
|
||
sys.path.insert(0, str(ROOT))
|
||
|
||
from tests.generate_golden import make_ohlcv # noqa: E402
|
||
|
||
|
||
def test_tf_df_full_init_smoke():
|
||
from chanlun import TF_DF
|
||
|
||
df = make_ohlcv(400)
|
||
# interval=1:不重采样,走完整 init_TF_DF 流水线
|
||
tf = TF_DF(df, interval=1, timeframe="5m")
|
||
assert tf is not None
|
||
assert len(getattr(tf, "klu_list", []) or []) > 0
|
||
assert hasattr(tf, "bi_list")
|
||
assert hasattr(tf, "seg_list")
|
||
assert getattr(tf, "chanmacd", None) is not None
|