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

Method test_config1_ok

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

Source from the content-addressed store, hash-verified

3295 self.assert_log_lines([])
3296
3297 def test_config1_ok(self, config=config1):
3298 # A config defining a sub-parser as well.
3299 with support.captured_stdout() as output:
3300 self.apply_config(config)
3301 logger = logging.getLogger("compiler.parser")
3302 # Both will output a message
3303 logger.info(self.next_message())
3304 logger.error(self.next_message())
3305 self.assert_log_lines([
3306 ('INFO', '1'),
3307 ('ERROR', '2'),
3308 ], stream=output)
3309 # Original logger output is empty.
3310 self.assert_log_lines([])
3311
3312 def test_config2_failure(self):
3313 # A simple config which overrides the default settings.

Callers 2

test_config5_okMethod · 0.95
test_config11_okMethod · 0.95

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