Handle warnings raised at import time early in pytest process #12249
Labels
plugin: warnings
related to the warnings builtin plugin
type: proposal
proposal for a new feature, often to gather opinions or design the API around the new feature
As noted in #12248, some modules can raise warnings at import time. If this happens during
AssertionRewritingHook
's actions, then they get raised early and cannot be controlled by the pytestfilterwarnings
config, which is unfortunate. There should be a good way to suppress these with normal pytest config options.Currently witnessing this on
platform linux -- Python 3.11.9, pytest-8.1.1, pluggy-1.4.0
Example issue:
The text was updated successfully, but these errors were encountered: