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

Method test_config_9_ok

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

Source from the content-addressed store, hash-verified

3539 self.assert_log_lines([])
3540
3541 def test_config_9_ok(self):
3542 with support.captured_stdout() as output:
3543 self.apply_config(self.config9)
3544 self.check_handler('hand1', logging.StreamHandler)
3545 logger = logging.getLogger("compiler.parser")
3546 # Nothing will be output since both handler and logger are set to WARNING
3547 logger.info(self.next_message())
3548 self.assert_log_lines([], stream=output)
3549 self.apply_config(self.config9a)
3550 # Nothing will be output since handler is still set to WARNING
3551 logger.info(self.next_message())
3552 self.assert_log_lines([], stream=output)
3553 self.apply_config(self.config9b)
3554 # Message should now be output
3555 logger.info(self.next_message())
3556 self.assert_log_lines([
3557 ('INFO', '3'),
3558 ], stream=output)
3559
3560 def test_config_10_ok(self):
3561 with support.captured_stdout() as output:

Callers

nothing calls this directly

Calls 6

apply_configMethod · 0.95
check_handlerMethod · 0.95
getLoggerMethod · 0.80
next_messageMethod · 0.80
assert_log_linesMethod · 0.80
infoMethod · 0.45

Tested by

no test coverage detected