Files
PythagorasGoal/tests/portfolio/test_definitions.py
T
2026-05-29 15:58:33 +02:00

18 lines
511 B
Python

from scripts.portfolios._defs import PORTFOLIOS
def test_six_portfolios_defined():
assert set(PORTFOLIOS) == {"PORT01", "PORT02", "PORT03", "PORT04", "PORT05", "PORT06"}
def test_port06_is_master_shape_cap():
p = PORTFOLIOS["PORT06"]
sids = set(p.sleeve_ids)
assert {"SH_BTC", "SH_ETH", "TSM01", "PR_ETHBTC"} <= sids
assert len(sids) == 17
assert p.weighting == "cap" and p.caps == {"PAIRS": 0.33}
def test_default_leverage_sober():
assert PORTFOLIOS["PORT06"].leverage == 2.0