MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / test_collects_created_files

Method test_collects_created_files

tests/test_watcher.py:19–31  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

17
18class TestDebouncedHandler:
19 def test_collects_created_files(self):
20 callback = MagicMock()
21 handler = DebouncedHandler(callback, debounce_seconds=100)
22
23 handler.on_created(_make_file_event("/raw/doc.pdf"))
24 handler.on_created(_make_file_event("/raw/notes.md"))
25
26 # Cancel pending timer; check pending set
27 if handler._timer:
28 handler._timer.cancel()
29
30 assert "/raw/doc.pdf" in handler._pending
31 assert "/raw/notes.md" in handler._pending
32
33 def test_collects_modified_files(self):
34 callback = MagicMock()

Callers

nothing calls this directly

Calls 3

on_createdMethod · 0.95
DebouncedHandlerClass · 0.90
_make_file_eventFunction · 0.85

Tested by

no test coverage detected