What's the problem this feature will solve?
I had written a plugin pytest-max-warnings to exit with an error to help users set expectations of ratcheting down warnings
Describe the solution you'd like
When a user runs their pytest test suite with either a CLI flag of --max warnings N, or a config file max_warnings = N where N is an integer, at the end of their test run, the test run will fail if the amount of warnings emitted exceeds N.
Alternative Solutions
I wrote a plugin, now want to move it into core.
Additional context
Tagging @graingert who suggested the plugin could be merged into pytest as-is a while back, so now I'm raising an issue so I can implement that, with maybe some improvments around configuration and exit codes.
What's the problem this feature will solve?
I had written a plugin
pytest-max-warningsto exit with an error to help users set expectations of ratcheting down warningsDescribe the solution you'd like
When a user runs their
pytesttest suite with either a CLI flag of--max warnings N, or a config filemax_warnings = Nwhere N is an integer, at the end of their test run, the test run will fail if the amount of warnings emitted exceeds N.Alternative Solutions
I wrote a plugin, now want to move it into core.
Additional context
Tagging @graingert who suggested the plugin could be merged into
pytestas-is a while back, so now I'm raising an issue so I can implement that, with maybe some improvments around configuration and exit codes.