Fix nested caplog.filtering early removal by oaksprout · Pull Request #14284 · pytest-dev/pytest
Navigation Menu
{{ message }}
pytest-dev / pytest Public
- Notifications You must be signed in to change notification settings
- Fork 3.1k
Open
oaksprout wants to merge 8 commits intopytest-dev:mainfrom
Open
Fix nested caplog.filtering early removal#14284
oaksprout wants to merge 8 commits intopytest-dev:mainfrom
Fix nested caplog.filtering early removal#14284
oaksprout wants to merge 8 commits intopytest-dev:mainfrom
Conversation
Copy link
oaksprout
commented
Mar 13, 2026
oaksprout
commented
Closes #14189. Nested caplog.filtering usage was eagerly removing filters when the inner context manager exited, even if the filter was already present from the outer context manager. This PR ensures the filter is only removed if it wasn't already present when the context manager was entered.
oaksprout added 2 commits
March 13, 2026 16:25Closes pytest-dev#14189 by checking if the filter is already present before adding or removing it.
psf-chronographer
bot
added
the
bot:chronographer:provided
label
Mar 13, 2026oaksprout and others added 6 commits
March 13, 2026 16:44for more information, see https://pre-commit.ci
This comment was marked as spam.
This comment was marked as spam.
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