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

Method test_config9_ok

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

Source from the content-addressed store, hash-verified

1712 self.addCleanup(closeFileHandler, handler, fn)
1713
1714 def test_config9_ok(self):
1715 self.apply_config(self.config9)
1716 formatter = logging.root.handlers[0].formatter
1717 result = formatter.format(logging.makeLogRecord({'msg': 'test'}))
1718 self.assertEqual(result, 'test ++ defaultvalue')
1719 result = formatter.format(logging.makeLogRecord(
1720 {'msg': 'test', 'customfield': "customvalue"}))
1721 self.assertEqual(result, 'test ++ customvalue')
1722
1723
1724 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