Is there a way to suppress the pytest\'s internal deprecation warnings?
Context: I\'m looking to evaluate the difficulty of porting a test suite from nose
pytest -p no:warnings, or add the following to your pytest.ini or tox.ini:
[pytest]
addopts = -p no:warnings
The result will be green without any indication of warnings. See documentation at https://docs.pytest.org/en/latest/warnings.html#disabling-warnings-summary.
This can be a valid use case for a test suite where you want clean output.
Be aware that always hiding all warnings may cause you to miss important warnings. If you want to hide only specific warnings, look at Cloc's answer.