summaryrefslogtreecommitdiff
path: root/testing/test_internal_log_level.py
diff options
context:
space:
mode:
Diffstat (limited to 'testing/test_internal_log_level.py')
-rw-r--r--testing/test_internal_log_level.py15
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