Cover the excluded-directory branch in FileFilter with a direct test#3014
Merged
Conversation
The reload tests that exercise this branch through real file watching are skipped on Windows and macOS, so per-job coverage intermittently missed it on 3.14t runs. A direct unit test pins the behavior deterministically on every platform and lets the pragma workaround from #2974 go.
Contributor
|
📖 Docs preview: https://f97bac18-uvicorn.marcelotryle.workers.dev |
Kludex
enabled auto-merge (squash)
July 4, 2026 07:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Adds a direct unit test for
FileFilter's excluded-directory branch and removes thepragma: no coverworkaround from #2974.The reload tests that exercise this branch through real file watching are skipped on Windows and macOS, so per-job coverage intermittently missed the line on 3.14t runs and failed
fail_under = 100(the pragma from #2974 only moved the miss to the adjacent line). The unit test pins the current behavior deterministically on every platform: a glob include inside an excluded directory is not watched.No behavior change.
AI Disclaimer
This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.