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

Method test_config1_ok

Lib/test/test_logging.py:3354–3367  ·  view source on GitHub ↗
(self, config=config1)

Source from the content-addressed store, hash-verified

3352 self.assert_log_lines([])
3353
3354 def test_config1_ok(self, config=config1):
3355 # A config defining a sub-parser as well.
3356 with support.captured_stdout() as output:
3357 self.apply_config(config)
3358 logger = logging.getLogger("compiler.parser")
3359 # Both will output a message
3360 logger.info(self.next_message())
3361 logger.error(self.next_message())
3362 self.assert_log_lines([
3363 ('INFO', '1'),
3364 ('ERROR', '2'),
3365 ], stream=output)
3366 # Original logger output is empty.
3367 self.assert_log_lines([])
3368
3369 def test_config2_failure(self):
3370 # A simple config which overrides the default settings.

Calls 6

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

Tested by

no test coverage detected