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

Method test_config8_ok

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

Source from the content-addressed store, hash-verified

1694 self.assert_log_lines([])
1695
1696 def test_config8_ok(self):
1697
1698 with self.check_no_resource_warning():
1699 fn = make_temp_file(".log", "test_logging-X-")
1700
1701 # Replace single backslash with double backslash in windows
1702 # to avoid unicode error during string formatting
1703 if os.name == "nt":
1704 fn = fn.replace("\\", "\\\\")
1705
1706 config8 = self.config8.format(tempfile=fn)
1707
1708 self.apply_config(config8)
1709 self.apply_config(config8)
1710
1711 handler = logging.root.handlers[0]
1712 self.addCleanup(closeFileHandler, handler, fn)
1713
1714 def test_config9_ok(self):
1715 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