[Python] How to suppress third party logs in pytest

Discussão em 'Python' iniciado por Stack, Fevereiro 6, 2025.

  1. Stack

    Stack Membro Participativo

    We've just switched from nose to pytest and there doesn't seem to be an option to suppress third party logging. In nose config, we had the following line:

    logging-filter=-matplotlib,-chardet.charsetprober,-PIL,-fiona.env,-fiona._env


    Some of those logs are very chatty, especially matplotlib and we don't want to see the output, just output from our logs.

    I can't find an equivalent setting in pytest though. Is it possible? Am I missing something? Thanks.

    Continue reading...

Compartilhe esta Página