docs(pairing): address reviewer comments — comments, error msg, __all__ test
- Clarify SystemExit message for missing/null allowFrom (manager.py) - Document why Feishu passes content="" for unauthorized DMs - Document exact-match semantics in BaseChannel.is_allowed() - Document negligible collision probability in generate_code() - Add test_all_exports_are_importable for nanobot.pairing.__all__
This commit is contained in:
@@ -2,9 +2,18 @@ import time
|
||||
|
||||
import pytest
|
||||
|
||||
from nanobot.pairing import __all__ as pairing_all
|
||||
from nanobot.pairing import store
|
||||
|
||||
|
||||
def test_all_exports_are_importable():
|
||||
"""Every name in __all__ must actually be importable from nanobot.pairing."""
|
||||
import nanobot.pairing as pkg
|
||||
|
||||
for name in pairing_all:
|
||||
assert hasattr(pkg, name), f"{name} is in __all__ but not exported"
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _tmp_store(tmp_path, monkeypatch):
|
||||
path = tmp_path / "pairing.json"
|
||||
|
||||
Reference in New Issue
Block a user