feat: technical, news, and social analysis agents

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-20 17:52:51 +09:00
parent 46e06df131
commit 7e1d556385
6 changed files with 295 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import pytest
from agents.social import SocialAgent
def test_score_bullish_social():
agent = SocialAgent()
sentiment = {"positive": 8, "negative": 1, "neutral": 1, "total": 10}
score = agent.analyze(sentiment, mention_trend=2.5)
assert score >= 70
def test_score_bearish_social():
agent = SocialAgent()
sentiment = {"positive": 1, "negative": 8, "neutral": 1, "total": 10}
score = agent.analyze(sentiment, mention_trend=0.5)
assert score <= 35
def test_no_data_returns_50():
agent = SocialAgent()
score = agent.analyze({"positive": 0, "negative": 0, "neutral": 0, "total": 0}, 1.0)
assert score == 50