[claude] Add unit tests for events system backbone (#917) #1289
Reference in New Issue
Block a user
Delete Branch "claude/issue-917"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #917
What this does
The
infrastructure/events/bus.pymodule had 0% coverage in the standard CI gate because the existing test file (test_event_bus.py) lacked apytestmarkdeclaration — all 38 tests were silently filtered out by the-m "unit and not ..."marker.Changes
tests/infrastructure/test_event_bus.pypytestmark = pytest.mark.unitat module level so all 38 tests run intox -e unittest_init_persistence_db_noop_when_path_is_noneto cover the defensive early-return guard in_init_persistence_db(the sole previously-uncovered line)Result
infrastructure/events/bus.py: 100% coverage (was excluded entirely)tox -e unit✓Note on broadcaster.py
The issue mentions
broadcaster.py+bus.py, butbroadcaster.pydoes not exist in the codebase. Onlybus.pyexists undersrc/infrastructure/events/.