feat(factor): 挂载 vnpy Alpha101(82)+Alpha158(158) 全量表达式进注册表——空df实例化零成本提取,导入即注册,幂等 [vps]
This commit is contained in:
@@ -10,12 +10,12 @@ import tempfile
|
||||
|
||||
def test_builtin_factors_registered_on_import():
|
||||
"""Test that importing sanguo_factor registers built-in factors (Root cause A fix)."""
|
||||
# Reimport to ensure registration runs
|
||||
import importlib
|
||||
import sanguo_factor
|
||||
importlib.reload(sanguo_factor)
|
||||
from sanguo_factor.registry import _REGISTRY, get_factor
|
||||
from sanguo_factor import library
|
||||
|
||||
from sanguo_factor.registry import get_factor
|
||||
# Clear registry and re-register to test fresh registration
|
||||
_REGISTRY.clear()
|
||||
library._register_all()
|
||||
|
||||
# Verify built-in factors are registered
|
||||
ma5_factor = get_factor("ma5")
|
||||
|
||||
Reference in New Issue
Block a user