Blame view

tests/conftest.py 652 Bytes
99b72698   tangwang   测试回归钩子梳理
1
2
3
4
  """pytest 全局配置。
  
  - 项目根路径注入(便于 `tests/` 下模块直接 `from <pkg>` 导入)
  - marker / testpaths / 过滤规则的**权威来源是 `pytest.ini`**,不在这里重复定义
16c42787   tangwang   feat: implement r...
5
  
99b72698   tangwang   测试回归钩子梳理
6
7
8
  历史上这里曾定义过一批 `sample_search_config / mock_es_client / test_searcher` 
  fixture,但 2026-Q2 起的测试全部自带 fake stub,这些 fixture 全库无人引用,已一并
  移除。新增共享 fixture 时请明确列出其被哪些测试使用,避免再次出现 dead fixtures
16c42787   tangwang   feat: implement r...
9
10
11
12
  """
  
  import os
  import sys
16c42787   tangwang   feat: implement r...
13
  
16c42787   tangwang   feat: implement r...
14
15
  project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  sys.path.insert(0, project_root)