feat(fase1): export domain-model public API + green full suite (F1)
This commit is contained in:
parent
69ca508677
commit
847ed90135
2 changed files with 49 additions and 1 deletions
|
|
@ -21,3 +21,25 @@ def test_core_runtime_deps_importable_and_cbc_available() -> None:
|
|||
# PuLP 3.3.2's available() returns the resolved CBC binary PATH (a truthy str) when
|
||||
# present, not the bool True — so assert truthiness, not identity.
|
||||
assert pulp.PULP_CBC_CMD(msg=False).available()
|
||||
|
||||
|
||||
def test_fase1_domain_model_public_api_importable() -> None:
|
||||
"""SC10: every Fase 1 domain-model symbol is importable from the package root (the explicit
|
||||
__all__ export), so a deployer reaches the new API without deep-importing submodules."""
|
||||
import portfolio_optimiser as po
|
||||
|
||||
expected = {
|
||||
"Dimension",
|
||||
"admits",
|
||||
"SavingsLedger",
|
||||
"LedgerEntry",
|
||||
"realize",
|
||||
"RealizationRefused",
|
||||
"GoalContract",
|
||||
"GoalConfig",
|
||||
"load_goal_config",
|
||||
"GoalReached",
|
||||
}
|
||||
assert expected <= set(po.__all__) # each is publicly exported
|
||||
for name in expected:
|
||||
assert hasattr(po, name), f"{name} is in __all__ but not importable from the package root"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue