make name a required argument and add fallback to getEffectiveLevel

This commit is contained in:
gcarq
2018-03-25 21:05:10 +02:00
parent a2c3df3ac5
commit 3f8d7dae39
14 changed files with 20 additions and 21 deletions

View File

@@ -12,13 +12,13 @@ def test_logger_object() -> None:
Test the Constants object has the mandatory Constants
:return: None
"""
logger = Logger()
logger = Logger('')
assert logger.name == ''
assert logger.level == 20
assert logger.level is logging.INFO
assert hasattr(logger, 'get_logger')
logger = Logger(name='Foo', level=logging.WARNING)
logger = Logger('Foo', level=logging.WARNING)
assert logger.name == 'Foo'
assert logger.name != ''
assert logger.level == 30