Skip to content
Snippets Groups Projects
Commit 151a2f95 authored by Nicolas Dandrimont's avatar Nicolas Dandrimont
Browse files

cli: Ensure tests don't mess with the global logging setup

Notably, using logging.config.dictConfig disables all loggers before
setting its own config. There's no simple way of undoing these changes
to the logging config.

Even if we had a way to reset a basic logging config, pytest reuses its
log handler instances across tests, so it's not even that simple to be
able to reset the logging config from scratch and still have pytest able
to capture logs.

Instead of any of that, just add a fixture to reset the root logger
level, and to mock logging.config.dictConfig so that it doesn't actually
get called.
parent 8f2cfa88
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment