pytest: selective log levels on a per-module basis
I had the same problem, and found a solution in another answer:
Instead of --log-cli-level=DEBUG
, use --log-level DEBUG
. It disables all third-party module logs (in my case, I had plenty of matplotlib logs), but still outputs your app logs for each test that fails.