15 lines
479 B
Python
15 lines
479 B
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
测试配置文件
|
|
用于设置测试环境的路径和配置
|
|
"""
|
|
import os
|
|
import sys
|
|
|
|
# 添加项目根目录到 Python 路径,确保能导入 zhyy 模块
|
|
current_file_path = os.path.abspath(__file__)
|
|
# 从 test_case/TestCase/接口/conftest.py 向上找到项目根目录 d:\zhyy
|
|
project_root = os.path.abspath(os.path.join(os.path.dirname(current_file_path), '../../../..'))
|
|
if project_root not in sys.path:
|
|
sys.path.insert(0, project_root)
|