自动刷新常态只拉 recent 尾部 K,每 1 分钟全量重算缠论;修复结构区缓存导入;默认指标/4h·1h·15m/近30天;同步 ECR-009 screener 相关改动。 Co-authored-by: Cursor <cursoragent@cursor.com>
32 lines
698 B
Python
32 lines
698 B
Python
"""Unit tests for TF combo validation."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import pytest
|
|
|
|
from crypto_wyckoff.combos import (
|
|
add_combo,
|
|
delete_combo,
|
|
get_combo,
|
|
list_combos,
|
|
validate_combo,
|
|
)
|
|
|
|
|
|
def test_builtin_default_is_h8_4_1():
|
|
c = get_combo(None)
|
|
assert c["id"] == "h8_4_1"
|
|
assert (c["high"], c["mid"], c["low"]) == ("8h", "4h", "1h")
|
|
|
|
|
|
def test_validate_order():
|
|
assert validate_combo("8h", "4h", "1h") is None
|
|
assert validate_combo("1h", "4h", "8h") is not None
|
|
assert validate_combo("8h", "8h", "1h") is not None
|
|
|
|
|
|
def test_list_includes_dwm():
|
|
ids = {c["id"] for c in list_combos()}
|
|
assert "h8_4_1" in ids
|
|
assert "d_w_m" in ids
|