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

Method test_config0_ok

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

Source from the content-addressed store, hash-verified

1574 logging.config.fileConfig(file, encoding="utf-8", **kwargs)
1575
1576 def test_config0_ok(self):
1577 # A simple config file which overrides the default settings.
1578 with support.captured_stdout() as output:
1579 self.apply_config(self.config0)
1580 logger = logging.getLogger()
1581 # Won't output anything
1582 logger.info(self.next_message())
1583 # Outputs a message
1584 logger.error(self.next_message())
1585 self.assert_log_lines([
1586 ('ERROR', '2'),
1587 ], stream=output)
1588 # Original logger output is empty.
1589 self.assert_log_lines([])
1590
1591 def test_config0_using_cp_ok(self):
1592 # A simple config file which overrides the default settings.

Callers

nothing calls this directly

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