Skip to content

A Pytest plugin to exit non-zero exit code when the configured maximum warnings has been exceeded

License

Notifications You must be signed in to change notification settings

miketheman/pytest-max-warnings

Repository files navigation

pytest-max-warnings

A Pytest plugin to exit non-zero exit code when the configured maximum warnings has been exceeded.

Installation

You can install "pytest-max-warnings" via pip:

pip install pytest-max-warnings

or any other package manager you prefer.

Usage

You can set the maximum number of warnings allowed by using the --max-warnings option:

pytest --max-warnings 10

If the number of warnings exceeds the maximum, the test run will exit with a non-zero exit code.

License

Distributed under the terms of the MIT license, "pytest-max-warnings" is free and open source software. See LICENSE for more details.

Authors