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

Method test_config8_ok

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

Source from the content-addressed store, hash-verified

1708 self.assert_log_lines([])
1709
1710 def test_config8_ok(self):
1711
1712 with self.check_no_resource_warning():
1713 fn = make_temp_file(".log", "test_logging-X-")
1714
1715 # Replace single backslash with double backslash in windows
1716 # to avoid unicode error during string formatting
1717 if os.name == "nt":
1718 fn = fn.replace("\\", "\\\\")
1719
1720 config8 = self.config8.format(tempfile=fn)
1721
1722 self.apply_config(config8)
1723 self.apply_config(config8)
1724
1725 handler = logging.root.handlers[0]
1726 self.addCleanup(closeFileHandler, handler, fn)
1727
1728 def test_config9_ok(self):
1729 self.apply_config(self.config9)

Callers

nothing calls this directly

Calls 5

apply_configMethod · 0.95
make_temp_fileFunction · 0.85
addCleanupMethod · 0.80
replaceMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected