Skip to content

test: add unit tests for watcher module (FileWatcher + MarkdownHandler)#562

Open
Ottohere-Mourn wants to merge 1 commit into
zilliztech:mainfrom
Ottohere-Mourn:test/watcher-unit-tests
Open

test: add unit tests for watcher module (FileWatcher + MarkdownHandler)#562
Ottohere-Mourn wants to merge 1 commit into
zilliztech:mainfrom
Ottohere-Mourn:test/watcher-unit-tests

Conversation

@Ottohere-Mourn

@Ottohere-Mourn Ottohere-Mourn commented May 30, 2026

Copy link
Copy Markdown

Summary

  • Added tests/test_watcher.py with unit tests for previously untested watcher module
  • Covers _MarkdownHandler (created/modified/deleted/non-markdown events, debounce coalescing)
  • Covers FileWatcher (lifecycle, directory scheduling, context manager, integration test)
  • Uses pytest fixtures and unittest.mock for isolation

Test Plan

  • All new tests pass
  • Existing test suite passes without regression

Added comprehensive tests for the previously untested watcher module
covering MarkdownHandler event handling, FileWatcher lifecycle, debounce
behavior, directory exclusion, and cleanup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant