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

Method test_config1_ok

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

Source from the content-addressed store, hash-verified

1621 self.assert_log_lines([])
1622
1623 def test_config1_ok(self, config=config1):
1624 # A config file defining a sub-parser as well.
1625 with support.captured_stdout() as output:
1626 self.apply_config(config)
1627 logger = logging.getLogger("compiler.parser")
1628 # Both will output a message
1629 logger.info(self.next_message())
1630 logger.error(self.next_message())
1631 self.assert_log_lines([
1632 ('INFO', '1'),
1633 ('ERROR', '2'),
1634 ], stream=output)
1635 # Original logger output is empty.
1636 self.assert_log_lines([])
1637
1638 def test_config2_failure(self):
1639 # A simple config file which overrides the default settings.

Callers 2

test_config5_okMethod · 0.95
test_config6_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