MCPcopy Create free account
hub / github.com/python/cpython / test_config_10_ok

Method test_config_10_ok

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

Source from the content-addressed store, hash-verified

3558 ], stream=output)
3559
3560 def test_config_10_ok(self):
3561 with support.captured_stdout() as output:
3562 self.apply_config(self.config10)
3563 self.check_handler('hand1', logging.StreamHandler)
3564 logger = logging.getLogger("compiler.parser")
3565 logger.warning(self.next_message())
3566 logger = logging.getLogger('compiler')
3567 # Not output, because filtered
3568 logger.warning(self.next_message())
3569 logger = logging.getLogger('compiler.lexer')
3570 # Not output, because filtered
3571 logger.warning(self.next_message())
3572 logger = logging.getLogger("compiler.parser.codegen")
3573 # Output, as not filtered
3574 logger.error(self.next_message())
3575 self.assert_log_lines([
3576 ('WARNING', '1'),
3577 ('ERROR', '4'),
3578 ], stream=output)
3579
3580 def test_config11_ok(self):
3581 self.test_config1_ok(self.config11)

Callers

nothing calls this directly

Calls 7

apply_configMethod · 0.95
check_handlerMethod · 0.95
getLoggerMethod · 0.80
next_messageMethod · 0.80
assert_log_linesMethod · 0.80
warningMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected