diff options
author | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> | 2023-04-27 15:49:12 +0200 |
---|---|---|
committer | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> | 2023-04-27 15:49:12 +0200 |
commit | 9889d8376d4a00ce7a6d3750f2f90841c3288849 (patch) | |
tree | 7ba49174503b85f9c6f7c4ded4d7f774d30c6dee /testing/test_internal_log_level.py | |
parent | 7aae8d1687af3ce1c5dad7f19485ea6027d57bae (diff) | |
download | setuptools-scm-9889d8376d4a00ce7a6d3750f2f90841c3288849.tar.gz |
restore logging functionality
there was an unintended misconfiguration in the logging setup enforcing always warning levels
Diffstat (limited to 'testing/test_internal_log_level.py')
-rw-r--r-- | testing/test_internal_log_level.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/test_internal_log_level.py b/testing/test_internal_log_level.py new file mode 100644 index 0000000..68ce8e0 --- /dev/null +++ b/testing/test_internal_log_level.py @@ -0,0 +1,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 |