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

Method test_logrecord_class

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

Source from the content-addressed store, hash-verified

4317 logging.setLogRecordFactory(self.orig_factory)
4318
4319 def test_logrecord_class(self):
4320 self.assertRaises(TypeError, self.root_logger.warning,
4321 self.next_message())
4322 logging.setLogRecordFactory(DerivedLogRecord)
4323 self.root_logger.error(self.next_message())
4324 self.assert_log_lines([
4325 ('root', 'ERROR', '2'),
4326 ])
4327
4328
4329@threading_helper.requires_working_threading()

Callers

nothing calls this directly

Calls 5

next_messageMethod · 0.80
setLogRecordFactoryMethod · 0.80
assert_log_linesMethod · 0.80
assertRaisesMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected