MCPcopy Index your code
hub / github.com/python/cpython / test_has_handlers

Method test_has_handlers

Lib/test/test_logging.py:6211–6216  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6209 self.assertIn('valid_key', result.__dict__)
6210
6211 def test_has_handlers(self):
6212 self.assertTrue(self.logger.hasHandlers())
6213
6214 for handler in self.logger.handlers:
6215 self.logger.removeHandler(handler)
6216 self.assertFalse(self.logger.hasHandlers())
6217
6218 def test_has_handlers_no_propagate(self):
6219 child_logger = logging.getLogger('blah.child')

Callers

nothing calls this directly

Calls 4

assertTrueMethod · 0.80
removeHandlerMethod · 0.80
assertFalseMethod · 0.80
hasHandlersMethod · 0.45

Tested by

no test coverage detected