test: add logging tests
This commit is contained in:
1 parent
3c9547adaf
commit
ebc3053e9a
2 files changed
+12
-1
No files matched your search
@@ -32,7 +32,6 @@ include-package-data = true
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
aarecommon = [
|
||||
"config/logging_configs/*.yaml",
|
||||
"config/beamline_configs/*.yaml",
|
||||
]
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import logging
|
||||
|
||||
from aarecommon.config.logger import setup_logger
|
||||
|
||||
|
||||
def test_handler_levels():
|
||||
setup_logger("aareDAQ")
|
||||
assert logging.getLogger("redis_lock").level == logging.WARNING
|
||||
|
||||
assert logging.getLogger("unknown").level == 0
|
||||
setup_logger("unknown")
|
||||
assert logging.getLogger("unknown").level == logging.DEBUG
|
||||
Reference in new issue
Block a user