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:
@@ -65,6 +65,11 @@ def test_compute_factors_calls_prepare_and_fetch(tmp_path):
|
||||
"""
|
||||
import pytest
|
||||
pytest.importorskip("polars")
|
||||
# vnpy.alpha 仅 vnpy_v4.4.0 源码提供(容器内 sys.path 引用);本地 pip 装的 vnpy 无此子模块
|
||||
try:
|
||||
import vnpy.alpha # noqa: F401
|
||||
except ImportError:
|
||||
pytest.skip("vnpy.alpha 仅容器内可用(vnpy_v4.4.0 源码)")
|
||||
|
||||
from pathlib import Path
|
||||
from datetime import datetime
|
||||
@@ -173,6 +178,11 @@ def test_compute_factors_passes_aware_periods_to_alpha_dataset(tmp_path):
|
||||
"""
|
||||
import pytest
|
||||
pytest.importorskip("polars")
|
||||
# vnpy.alpha 仅 vnpy_v4.4.0 源码提供(容器内 sys.path 引用);本地 pip 装的 vnpy 无此子模块
|
||||
try:
|
||||
import vnpy.alpha # noqa: F401
|
||||
except ImportError:
|
||||
pytest.skip("vnpy.alpha 仅容器内可用(vnpy_v4.4.0 源码)")
|
||||
|
||||
from pathlib import Path
|
||||
from datetime import datetime
|
||||
|
||||
Reference in New Issue
Block a user