Consider you have a unit test written in pytest,
in which you check a state of some exception raised and caught within a function.
When an exception is caught, and error log message is written, which is fine - but less for the context of tests running, as it not clean and may cause confusion when tests are passing but an error log message appears.
Is there a simple way to suppress error messages from pytest perspective?