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

Method test_config14_ok

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

Source from the content-addressed store, hash-verified

3587 self.assertRaises(Exception, self.apply_config, self.config13)
3588
3589 def test_config14_ok(self):
3590 with support.captured_stdout() as output:
3591 self.apply_config(self.config14)
3592 h = logging._handlers['hand1']
3593 self.assertEqual(h.foo, 'bar')
3594 self.assertEqual(h.terminator, '!\n')
3595 logging.warning('Exclamation')
3596 self.assertEndsWith(output.getvalue(), 'Exclamation!\n')
3597
3598 def test_config15_ok(self):
3599

Callers

nothing calls this directly

Calls 5

apply_configMethod · 0.95
assertEndsWithMethod · 0.80
assertEqualMethod · 0.45
warningMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected