Compare commits
1 Commits
main
...
claude/iss
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e55fc07f5e |
@@ -7,6 +7,8 @@ from unittest.mock import patch
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
import infrastructure.events.bus as bus_module
|
import infrastructure.events.bus as bus_module
|
||||||
|
|
||||||
|
pytestmark = pytest.mark.unit
|
||||||
from infrastructure.events.bus import (
|
from infrastructure.events.bus import (
|
||||||
Event,
|
Event,
|
||||||
EventBus,
|
EventBus,
|
||||||
@@ -352,6 +354,14 @@ class TestEventBusPersistence:
|
|||||||
events = bus.replay()
|
events = bus.replay()
|
||||||
assert events == []
|
assert events == []
|
||||||
|
|
||||||
|
def test_init_persistence_db_noop_when_path_is_none(self):
|
||||||
|
"""_init_persistence_db() is a no-op when _persistence_db_path is None."""
|
||||||
|
bus = EventBus()
|
||||||
|
# _persistence_db_path is None by default; calling _init_persistence_db
|
||||||
|
# should silently return without touching the filesystem.
|
||||||
|
bus._init_persistence_db() # must not raise
|
||||||
|
assert bus._persistence_db_path is None
|
||||||
|
|
||||||
async def test_wal_mode_on_persistence_db(self, persistent_bus):
|
async def test_wal_mode_on_persistence_db(self, persistent_bus):
|
||||||
"""Persistence database should use WAL mode."""
|
"""Persistence database should use WAL mode."""
|
||||||
conn = sqlite3.connect(str(persistent_bus._persistence_db_path))
|
conn = sqlite3.connect(str(persistent_bus._persistence_db_path))
|
||||||
|
|||||||
Reference in New Issue
Block a user