21 lines
478 B
Python
21 lines
478 B
Python
import sys
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
|
|
|
from router_system.router import build_router
|
|
|
|
|
|
@pytest.fixture()
|
|
def router():
|
|
"""共享的 mock 全链路路由实例(零依赖、离线可跑)"""
|
|
return build_router()
|
|
|
|
@pytest.fixture()
|
|
def kb():
|
|
"""v2 验证接地用的知识库实例(facts 对照)。"""
|
|
from router_system.knowledge import KnowledgeBase
|
|
return KnowledgeBase()
|