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

Method test_config_set_handler_names

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

Source from the content-addressed store, hash-verified

1745 self.assertFalse(logger.disabled)
1746
1747 def test_config_set_handler_names(self):
1748 test_config = """
1749 [loggers]
1750 keys=root
1751
1752 [handlers]
1753 keys=hand1
1754
1755 [formatters]
1756 keys=form1
1757
1758 [logger_root]
1759 handlers=hand1
1760
1761 [handler_hand1]
1762 class=StreamHandler
1763 formatter=form1
1764
1765 [formatter_form1]
1766 format=%(levelname)s ++ %(message)s
1767 """
1768 self.apply_config(test_config)
1769 self.assertEqual(logging.getLogger().handlers[0].name, 'hand1')
1770
1771 def test_exception_if_confg_file_is_invalid(self):
1772 test_config = """

Callers

nothing calls this directly

Calls 3

apply_configMethod · 0.95
getLoggerMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected