新增tests;新增管道健康预测方法;更新复合查询函数输出格式
This commit is contained in:
14
tests/conftest.py
Normal file
14
tests/conftest.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import pytest
|
||||
import sys
|
||||
import os
|
||||
|
||||
# 自动添加项目根目录到路径(处理项目结构)
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
|
||||
|
||||
|
||||
def run_this_test(test_file):
|
||||
"""自定义函数:运行单个测试文件(类似pytest)"""
|
||||
# 提取测试文件名(无扩展名)
|
||||
test_name = os.path.splitext(os.path.basename(test_file))[0]
|
||||
# 使用pytest运行(自动处理导入)
|
||||
pytest.main([test_file, "-v"])
|
||||
Reference in New Issue
Block a user