Files
Danglewood 869cfed125 [Release] openbb-v5.0.0 (#7741)
* merge branch develop with main

* bump desktop version

* fix the merge

* sync Cargo.lock to desktop 2.0.0

* fix cli conftest.py

---------

Co-authored-by: deeleeramone <>
2026-09-29 10:58:44 -07:00

42 lines
1.1 KiB
Python

"""Tests for ``openbb_quantitative.router`` - the aggregating router."""
from openbb_core.app.router import Router
from openbb_quantitative.router import router
EXPECTED_ROUTES = {
"/normality",
"/capm",
"/unitroot_test",
"/summary",
"/factors",
"/risk_decomposition",
"/attribution",
"/rolling/skew",
"/rolling/variance",
"/rolling/stdev",
"/rolling/kurtosis",
"/rolling/mean",
"/rolling/quantile",
"/rolling/factors",
"/stats/skew",
"/stats/variance",
"/stats/stdev",
"/stats/kurtosis",
"/stats/mean",
"/stats/quantile",
"/performance/omega_ratio",
"/performance/sharpe_ratio",
"/performance/sortino_ratio",
}
def test_router_aggregates_every_command():
"""The top-level router wires every quantitative command exactly once."""
from openbb_core.app.route_iter import iter_api_routes
assert isinstance(router, Router)
paths = [r.path for r in iter_api_routes(router.api_router)]
assert set(paths) == EXPECTED_ROUTES
assert len(paths) == len(EXPECTED_ROUTES)