conftest.py 234 B

123456789101112
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. """
  4. pytest 配置
  5. """
  6. import os
  7. import sys
  8. # 将项目根目录添加到路径
  9. PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  10. sys.path.insert(0, PROJECT_ROOT)