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

Method test_flush_clears_pending

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

Source from the content-addressed store, hash-verified

78 assert received == ["/raw/a.md", "/raw/b.pdf", "/raw/c.txt"]
79
80 def test_flush_clears_pending(self):
81 callback = MagicMock()
82 handler = DebouncedHandler(callback, debounce_seconds=100)
83 handler._pending = {"/raw/doc.pdf"}
84
85 handler._flush()
86
87 assert len(handler._pending) == 0
88
89 def test_flush_does_not_call_callback_when_empty(self):
90 callback = MagicMock()

Callers

nothing calls this directly

Calls 2

_flushMethod · 0.95
DebouncedHandlerClass · 0.90

Tested by

no test coverage detected