MCPcopy Create free account
hub / github.com/RustPython/RustPython / test_config_9_ok

Method test_config_9_ok

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

Source from the content-addressed store, hash-verified

3473 self.assert_log_lines([])
3474
3475 def test_config_9_ok(self):
3476 with support.captured_stdout() as output:
3477 self.apply_config(self.config9)
3478 self.check_handler('hand1', logging.StreamHandler)
3479 logger = logging.getLogger("compiler.parser")
3480 # Nothing will be output since both handler and logger are set to WARNING
3481 logger.info(self.next_message())
3482 self.assert_log_lines([], stream=output)
3483 self.apply_config(self.config9a)
3484 # Nothing will be output since handler is still set to WARNING
3485 logger.info(self.next_message())
3486 self.assert_log_lines([], stream=output)
3487 self.apply_config(self.config9b)
3488 # Message should now be output
3489 logger.info(self.next_message())
3490 self.assert_log_lines([
3491 ('INFO', '3'),
3492 ], stream=output)
3493
3494 def test_config_10_ok(self):
3495 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