generated from kgod/ai-review-template
自内部仓库剥离深度优化与 RAG 知识库后的交付版本: - Builder 对话式简历生成(FSM + 意图路由 LLM 兜底增强) - 条目级轻度优化:事实覆盖门禁 + STAR/bullet 修复链,功能/简介/成果与技术栈同级保护 - 简历导入:DOCX/PDF 解析、结构归一、手机号脱敏 - PostgreSQL 运行时 + Alembic 迁移链 Co-Authored-By: Claude <noreply@anthropic.com>
20 lines
748 B
Python
20 lines
748 B
Python
"""Tests for deterministic position-to-dimension weighting."""
|
|
|
|
from app.job_rubric import dimension_weights, position_family
|
|
|
|
|
|
def test_position_family_alias_mapping():
|
|
assert position_family("数据分析师") == "data"
|
|
assert position_family("后端工程师") == "tech"
|
|
assert position_family("产品经理") == "product"
|
|
assert position_family("不存在的岗位") == "default"
|
|
assert position_family(None) == "default"
|
|
assert position_family("高级后端开发工程师") == "tech"
|
|
|
|
|
|
def test_data_position_weights_quantified_outcome_highest():
|
|
weights = dimension_weights("数据分析师")
|
|
|
|
assert weights["quantified_outcome"] == 3
|
|
assert weights["quantified_outcome"] > weights["activity_execution"]
|