9 lines
443 B
Python
9 lines
443 B
Python
import os, sys
|
|
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
import app.main as m
|
|
v=m._fx_verdict(1.0975); assert v["alert"] is False, v
|
|
v=m._fx_verdict(1.13); assert v["alert"] is True and v["drift_pct"] > 0, v
|
|
v=m._fx_verdict(1.07); assert v["alert"] is True and v["drift_pct"] < 0, v
|
|
v=m._fx_verdict(1.0995); assert v["alert"] is False, v # 0.18% drift
|
|
print("FX VERDICT OK: thresholds and signs behave")
|