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

Method test_config9_ok

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

Source from the content-addressed store, hash-verified

1726 self.addCleanup(closeFileHandler, handler, fn)
1727
1728 def test_config9_ok(self):
1729 self.apply_config(self.config9)
1730 formatter = logging.root.handlers[0].formatter
1731 result = formatter.format(logging.makeLogRecord({'msg': 'test'}))
1732 self.assertEqual(result, 'test ++ defaultvalue')
1733 result = formatter.format(logging.makeLogRecord(
1734 {'msg': 'test', 'customfield': "customvalue"}))
1735 self.assertEqual(result, 'test ++ customvalue')
1736
1737
1738 def test_logger_disabling(self):

Callers

nothing calls this directly

Calls 3

apply_configMethod · 0.95
formatMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected