Skip to content

Commit 6c62022

Browse files
committed
Increase test coverage of logging.py
1 parent fbe613f commit 6c62022

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/logging/test_logging.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,14 @@ def test_level_fallback(random_id, tmp_path):
142142
assert_message_file(logger, log_file, "warning", False)
143143
assert_message_file(logger, log_file, "error", False)
144144
assert_message_file(logger, log_file, "critical", True)
145+
146+
147+
def test_no_output(random_id):
148+
logger = getLogger(name=random_id, console=None, file=None)
149+
logger.error("error")
150+
151+
152+
def test_additional_deps(random_id):
153+
assert logging.getLogger("something").level == logging.NOTSET
154+
getLogger(name=random_id, additional_deps=["something"], console=None, file=None)
155+
assert logging.getLogger("something").level == logging.WARNING

0 commit comments

Comments
 (0)