"""pytest 全局配置。 - 项目根路径注入(便于 `tests/` 下模块直接 `from ` 导入) - marker / testpaths / 过滤规则的**权威来源是 `pytest.ini`**,不在这里重复定义 历史上这里曾定义过一批 `sample_search_config / mock_es_client / test_searcher` 等 fixture,但 2026-Q2 起的测试全部自带 fake stub,这些 fixture 全库无人引用,已一并 移除。新增共享 fixture 时请明确列出其被哪些测试使用,避免再次出现 dead fixtures。 """ import os import sys project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, project_root)