MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_config_10_ok

Method test_config_10_ok

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

Source from the content-addressed store, hash-verified

3492 ], stream=output)
3493
3494 def test_config_10_ok(self):
3495 with support.captured_stdout() as output:
3496 self.apply_config(self.config10)
3497 self.check_handler('hand1', logging.StreamHandler)
3498 logger = logging.getLogger("compiler.parser")
3499 logger.warning(self.next_message())
3500 logger = logging.getLogger('compiler')
3501 # Not output, because filtered
3502 logger.warning(self.next_message())
3503 logger = logging.getLogger('compiler.lexer')
3504 # Not output, because filtered
3505 logger.warning(self.next_message())
3506 logger = logging.getLogger("compiler.parser.codegen")
3507 # Output, as not filtered
3508 logger.error(self.next_message())
3509 self.assert_log_lines([
3510 ('WARNING', '1'),
3511 ('ERROR', '4'),
3512 ], stream=output)
3513
3514 def test_config11_ok(self):
3515 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