Skip to content

Commit cdfea8c

Browse files
authored
Update test_tools_misc.py
1 parent 56412ba commit cdfea8c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎tests/test_tools_misc.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class FakeSession:
3535

3636
def __init__(self) -> None:
3737
self.project_dir = "/tmp"
38+
self.config_path: str | None = None
3839
self.received_todos: list[dict] = []
3940
self._cancel = threading.Event()
4041

@@ -118,6 +119,14 @@ def test_cancel_event_proxies_to_session(self):
118119
def test_cancel_event_defaults_none(self):
119120
self.assertIsNone(ToolContext().cancel_event)
120121

122+
def test_config_path_defaults_none(self):
123+
self.assertIsNone(ToolContext().config_path)
124+
125+
def test_config_path_proxies_to_session(self):
126+
sess = FakeSession()
127+
sess.config_path = "/tmp/my-config.json"
128+
self.assertEqual(ToolContext(sess).config_path, "/tmp/my-config.json")
129+
121130

122131
class TestRegistry(unittest.TestCase):
123132
"""Registry lifecycle and error wrapping."""

0 commit comments

Comments
 (0)