test: 前后端对齐—容器复跑验证+清理僵尸测试
- test_main: FastAPI 0.139 _IncludedRouter 不再 flatten,改用 TestClient 探测路由 - datareader: 文件名(sh600000_daily)/patch target(vnpy.trader.database) 对齐 lazy import 实现 - alpha_lab/analyzer/data_adapter: vnpy.alpha/alphalens 容器专用本地 skip - 删 4 个测废弃 sanguo_web 的僵尸测试(-1267 行死代码) - pytest.ini: asyncio_mode=auto - frontend: package.json 加 test script(npm test 可跑) - NAS 容器 309 passed 全绿验证(Python 3.10,本机 303+6skip)
This commit is contained in:
@@ -68,6 +68,12 @@ def test_convert_empty_bars():
|
||||
|
||||
def test_save_alpha_lab_data():
|
||||
"""Test save_alpha_lab_data creates AlphaLab and saves data."""
|
||||
import pytest
|
||||
pytest.importorskip("alphalens")
|
||||
try:
|
||||
import vnpy.alpha # noqa: F401
|
||||
except ImportError:
|
||||
pytest.skip("vnpy.alpha 仅容器内可用(vnpy_v4.4.0 源码)")
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
from sanguo_factor.data_adapter import save_alpha_lab_data
|
||||
|
||||
Reference in New Issue
Block a user