Skip to content

Commit

Permalink
add no cover to _setup_root_logger
Browse files Browse the repository at this point in the history
  • Loading branch information
cbartz committed Apr 30, 2024
1 parent 3c16d06 commit d88db78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion repo_policy_compliance/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def setup() -> None:
def _setup_root_logger() -> None:
"""Set up the root logger."""
root_logger = logging.getLogger()
if not root_logger.handlers:
# pytest will have already set up a handler, so the following if clause is not covered.
if not root_logger.handlers: # pragma: no cover
# Setup logging handler
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.DEBUG)
Expand Down

0 comments on commit d88db78

Please sign in to comment.