summaryrefslogtreecommitdiff
path: root/Lib/unittest/_log.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/unittest/_log.py')
-rw-r--r--Lib/unittest/_log.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/unittest/_log.py b/Lib/unittest/_log.py
index 961c448a7f..94868e5bb9 100644
--- a/Lib/unittest/_log.py
+++ b/Lib/unittest/_log.py
@@ -47,6 +47,7 @@ class _AssertLogsContext(_BaseTestCaseContext):
logger = self.logger = logging.getLogger(self.logger_name)
formatter = logging.Formatter(self.LOGGING_FORMAT)
handler = _CapturingHandler()
+ handler.setLevel(self.level)
handler.setFormatter(formatter)
self.watcher = handler.watcher
self.old_handlers = logger.handlers[:]