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

Method test_child_loggers

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

Source from the content-addressed store, hash-verified

4193
4194class ChildLoggerTest(BaseTest):
4195 def test_child_loggers(self):
4196 r = logging.getLogger()
4197 l1 = logging.getLogger('abc')
4198 l2 = logging.getLogger('def.ghi')
4199 c1 = r.getChild('xyz')
4200 c2 = r.getChild('uvw.xyz')
4201 self.assertIs(c1, logging.getLogger('xyz'))
4202 self.assertIs(c2, logging.getLogger('uvw.xyz'))
4203 c1 = l1.getChild('def')
4204 c2 = c1.getChild('ghi')
4205 c3 = l1.getChild('def.ghi')
4206 self.assertIs(c1, logging.getLogger('abc.def'))
4207 self.assertIs(c2, logging.getLogger('abc.def.ghi'))
4208 self.assertIs(c2, c3)
4209
4210 def test_get_children(self):
4211 r = logging.getLogger()

Callers

nothing calls this directly

Calls 3

getLoggerMethod · 0.80
getChildMethod · 0.80
assertIsMethod · 0.45

Tested by

no test coverage detected