File: test_internal_log_level.py

package info (click to toggle)
setuptools-scm 8.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 584 kB
  • sloc: python: 4,567; sh: 27; makefile: 6
file content (15 lines) | stat: -rw-r--r-- 479 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from __future__ import annotations

import logging

from setuptools_scm import _log


def test_log_levels_when_set() -> None:
    assert _log._default_log_level({"SETUPTOOLS_SCM_DEBUG": ""}) == logging.DEBUG
    assert _log._default_log_level({"SETUPTOOLS_SCM_DEBUG": "INFO"}) == logging.DEBUG
    assert _log._default_log_level({"SETUPTOOLS_SCM_DEBUG": "3"}) == logging.DEBUG


def test_log_levels_when_unset() -> None:
    assert _log._default_log_level({}) == logging.WARNING