zacchiro / beangrep

Beangrep - grep-like filter for Beancount
GNU General Public License v2.0
11 stars 2 forks source link

Add tests for logging verbosity `--verbose` #17

Closed zacchiro closed 2 months ago

zacchiro commented 5 months ago

The only lines not covered by tests at the moment are the following ones from cli.py:

case 1:
    log_level = logging.INFO
case _:  # >= 2
    log_level = logging.DEBUG

They are not covered because setting logging verbosity using logging.basicConfig within a click.CliRunner context seems to do nothing, probably because another logger is already in place.

We need to figure out how to do that properly.