How to supress all warnings when running pytest?

Viewed 1150

Some warning can cause problems when running tests with pytest. It might be desirable to ignore all warnings. I could not find a clear way to suppress all warnings.

2 Answers

You can run the following command:

pytest --disable-warnings

This is the solution I found:

pytest -W ignore test_script.py
Related