Search code examples
pythonunit-testingtestingpytestwarnings

How to supress all warnings when running pytest?


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.


Solution

  • This is the solution I found:

    pytest -W ignore test_script.py