(self)
| 111 | handler._timer.cancel() |
| 112 | |
| 113 | def test_mixed_events_collected(self): |
| 114 | callback = MagicMock() |
| 115 | handler = DebouncedHandler(callback, debounce_seconds=100) |
| 116 | |
| 117 | handler.on_created(_make_file_event("/raw/new.pdf")) |
| 118 | handler.on_modified(_make_file_event("/raw/existing.md")) |
| 119 | handler.on_created(_make_file_event("/raw/.hidden")) # should be ignored |
| 120 | handler.on_created(_make_file_event("/raw/subdir", is_directory=True)) # ignored |
| 121 | |
| 122 | if handler._timer: |
| 123 | handler._timer.cancel() |
| 124 | |
| 125 | assert handler._pending == {"/raw/new.pdf", "/raw/existing.md"} |
nothing calls this directly
no test coverage detected