generated from kgod/ai-review-template
自内部仓库剥离深度优化与 RAG 知识库后的交付版本: - Builder 对话式简历生成(FSM + 意图路由 LLM 兜底增强) - 条目级轻度优化:事实覆盖门禁 + STAR/bullet 修复链,功能/简介/成果与技术栈同级保护 - 简历导入:DOCX/PDF 解析、结构归一、手机号脱敏 - PostgreSQL 运行时 + Alembic 迁移链 Co-Authored-By: Claude <noreply@anthropic.com>
30 lines
807 B
Python
30 lines
807 B
Python
from __future__ import annotations
|
|
|
|
import os
|
|
|
|
from sqlalchemy import create_engine, text
|
|
|
|
|
|
def test_langgraph_runtime_is_available() -> None:
|
|
from langgraph.graph import START, StateGraph
|
|
|
|
graph = StateGraph(dict)
|
|
graph.add_node("finish", lambda state: state)
|
|
graph.add_edge(START, "finish")
|
|
|
|
assert graph.compile().invoke({}) == {}
|
|
|
|
|
|
def test_postgres_test_database_has_pgvector() -> None:
|
|
database_url = os.environ["RESUME_AGENT_TEST_DATABASE_URL"]
|
|
engine = create_engine(database_url)
|
|
try:
|
|
with engine.connect() as connection:
|
|
extension = connection.execute(
|
|
text("SELECT extname FROM pg_extension WHERE extname = 'vector'")
|
|
).scalar_one_or_none()
|
|
finally:
|
|
engine.dispose()
|
|
|
|
assert extension == "vector"
|