feat(s52): export Notifier public contract + sync extending.md B11
This commit is contained in:
parent
1267f6c3eb
commit
b84f4d46bb
3 changed files with 48 additions and 2 deletions
|
|
@ -129,3 +129,23 @@ def test_config_fail_fast() -> None:
|
|||
|
||||
notifier = build_notifier(webhook_cfg, allow_egress=True)
|
||||
assert isinstance(notifier, WebhookNotifier)
|
||||
|
||||
|
||||
def test_public_contract_exported() -> None:
|
||||
"""The declared B11 contract is public authoring API: importable from the package top and
|
||||
listed in ``__all__`` (the brief-permitted export path — run.py's seam stays byte-intact)."""
|
||||
import portfolio_optimiser
|
||||
|
||||
exported = (
|
||||
"Notifier",
|
||||
"ConsoleNotifier",
|
||||
"FileNotifier",
|
||||
"WebhookNotifier",
|
||||
"build_notifier",
|
||||
"NotifierConfig",
|
||||
"NotifyError",
|
||||
"NotifyRefused",
|
||||
)
|
||||
for name in exported:
|
||||
assert name in portfolio_optimiser.__all__, f"{name} missing from __all__"
|
||||
assert hasattr(portfolio_optimiser, name), f"{name} not importable from package top"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue