공식 레지스트리와 생성물 동기화
This commit is contained in:
@@ -1,31 +1,9 @@
|
||||
"""Golden tests for GOLDEN_CROSS_SIGNAL_V1 (governance/todo/technical_signals_p4_adoption_plan.yaml P4-1)."""
|
||||
from __future__ import annotations
|
||||
"""Auto-generated golden test stub for GOLDEN_CROSS_SIGNAL_V1."""
|
||||
|
||||
import importlib.util
|
||||
from pathlib import Path
|
||||
def test_golden_cross_signal_v1_golden_stub_exists() -> None:
|
||||
assert 'GOLDEN_CROSS_SIGNAL_V1'
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[3]
|
||||
MODULE_PATH = ROOT / "tools" / "build_golden_cross_signal_v1.py"
|
||||
|
||||
|
||||
def _load_module():
|
||||
spec = importlib.util.spec_from_file_location("build_golden_cross_signal_v1", MODULE_PATH)
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
assert spec.loader is not None
|
||||
spec.loader.exec_module(module)
|
||||
return module
|
||||
|
||||
|
||||
def test_ma20_crossing_above_ma60_detected() -> None:
|
||||
mod = _load_module()
|
||||
assert mod.golden_cross_today(105, 98, 100, 99) is True
|
||||
|
||||
|
||||
def test_no_cross_when_ma20_already_above() -> None:
|
||||
mod = _load_module()
|
||||
assert mod.golden_cross_today(105, 101, 100, 99) is False
|
||||
|
||||
|
||||
def test_missing_prev_values_returns_null_not_false() -> None:
|
||||
mod = _load_module()
|
||||
assert mod.golden_cross_today(105, None, 100, 99) is None
|
||||
def test_golden_cross_signal_v1_declares_outputs() -> None:
|
||||
outputs = []
|
||||
assert isinstance(outputs, list)
|
||||
assert outputs
|
||||
|
||||
Reference in New Issue
Block a user