Enable live logging via fixture #9269
-
I am dynamically determining whether my tests are called with a debugger attached through the following fixture:
I would like to emulate the behavior of the Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
First of all, such a cli-logging fixture would be a great addition to the pytest logging plugin. I think it is possible to replicate the behavior of the log-cli feature in a All you need is the |
Beta Was this translation helpful? Give feedback.
First of all, such a cli-logging fixture would be a great addition to the pytest logging plugin.
I think it is possible to replicate the behavior of the log-cli feature in a
pytest fixture, but integrating it in a proper way into pytest might turn
out to be complicated.
All you need is the
catching_logs
ctx manager and the log_cli_level and the log_cli_handler.