新增tests;新增管道健康预测方法;更新复合查询函数输出格式

This commit is contained in:
JIANG
2025-12-15 18:31:29 +08:00
parent ea33fc270d
commit 9b5707841b
7 changed files with 261 additions and 36 deletions

14
tests/conftest.py Normal file
View 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"])