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

Method test_dict_arg

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

Source from the content-addressed store, hash-verified

5335 self.assertEndsWith(s, '>')
5336
5337 def test_dict_arg(self):
5338 h = RecordingHandler()
5339 r = logging.getLogger()
5340 r.addHandler(h)
5341 d = {'less' : 'more' }
5342 logging.warning('less is %(less)s', d)
5343 self.assertIs(h.records[0].args, d)
5344 self.assertEqual(h.records[0].message, 'less is more')
5345 r.removeHandler(h)
5346 h.close()
5347
5348 @staticmethod # pickled as target of child process in the following test
5349 def _extract_logrecord_process_name(key, logMultiprocessing, conn=None):

Callers

nothing calls this directly

Calls 8

RecordingHandlerClass · 0.85
getLoggerMethod · 0.80
addHandlerMethod · 0.80
removeHandlerMethod · 0.80
warningMethod · 0.45
assertIsMethod · 0.45
assertEqualMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected