Pytest suite for sin-context-bridge. Each file targets one module:
test_bridge.py—ContextBridgehappy + failure paths.test_sckg_source.py— SCKG adapter (uses monkeypatch, no real SCKG).test_sin_brain_source.py— sin-brain adapter.test_gitnexus_source.py— GitNexus CLI subprocess adapter.test_local_sqlite.py— local SQLite store (real DB, tmp_path).test_merger.py— pure-function merger logic.
- All tests use
tmp_pathfor filesystem isolation; nothing in the working dir is mutated. - The
localsource tests are the only ones that touch real I/O; the other adapters are mocked viamonkeypatch. - The CLI/MCP server is exercised in
hooks/post_install.shand via thesin-context-bridge servesmoke test, not in pytest (MCP stdio is awkward to test in-process).
cd ~/.config/opencode/skills/sin-context-bridge
pytest -qor, with coverage:
pytest --cov=lib --cov=scripts