"""T3.3 人才引力场 Agent 测试。 测试人才流动预测和主动推荐。 """ import pytest from app.services.talent_agent import predict_talent_flow, recommend_talent class TestPredictTalentFlow: """人才流动预测测试。""" async def test_returns_dict(self): """返回预测结果字典。""" result = await predict_talent_flow("张三,AI 算法工程师,3 年经验,当前在 A 公司") assert isinstance(result, dict) async def test_empty_input(self): """空输入返回字典。""" result = await predict_talent_flow("") assert isinstance(result, dict) class TestRecommendTalent: """人才推荐测试。""" async def test_returns_list(self): """返回推荐列表。""" result = await recommend_talent("需要 AI 算法工程师 1 名", "张三:AI 工程师;李四:数据科学家") assert isinstance(result, list) async def test_empty_input(self): """空输入返回空列表。""" result = await recommend_talent("", "") assert isinstance(result, list)