공식 레지스트리와 생성물 동기화
This commit is contained in:
@@ -1,36 +1,9 @@
|
||||
"""Golden tests for STRONG_CLOSE_SIGNAL_V1 (governance/todo/technical_signals_p4_adoption_plan.yaml P4-2)."""
|
||||
from __future__ import annotations
|
||||
"""Auto-generated golden test stub for STRONG_CLOSE_SIGNAL_V1."""
|
||||
|
||||
import importlib.util
|
||||
from pathlib import Path
|
||||
def test_strong_close_signal_v1_golden_stub_exists() -> None:
|
||||
assert 'STRONG_CLOSE_SIGNAL_V1'
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[3]
|
||||
MODULE_PATH = ROOT / "tools" / "build_strong_close_signal_v1.py"
|
||||
|
||||
|
||||
def _load_module():
|
||||
spec = importlib.util.spec_from_file_location("build_strong_close_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_close_near_high_is_strong_close() -> None:
|
||||
mod = _load_module()
|
||||
result = mod.evaluate_strong_close(99, 100, 90)
|
||||
assert result["strong_close"] is True
|
||||
assert result["close_position_pct"] == 90.0
|
||||
|
||||
|
||||
def test_close_near_low_is_not_strong_close() -> None:
|
||||
mod = _load_module()
|
||||
result = mod.evaluate_strong_close(91, 100, 90)
|
||||
assert result["strong_close"] is False
|
||||
|
||||
|
||||
def test_degenerate_high_equals_low_returns_null() -> None:
|
||||
mod = _load_module()
|
||||
result = mod.evaluate_strong_close(100, 100, 100)
|
||||
assert result["strong_close"] is None
|
||||
assert result["close_position_pct"] is None
|
||||
def test_strong_close_signal_v1_declares_outputs() -> None:
|
||||
outputs = []
|
||||
assert isinstance(outputs, list)
|
||||
assert outputs
|
||||
|
||||
Reference in New Issue
Block a user