MCPcopy Index your code
hub / github.com/bpython/bpython / load_temp_config

Method load_temp_config

bpython/test/test_config.py:13–20  ·  view source on GitHub ↗

Write config to a temporary file and load it.

(self, content)

Source from the content-addressed store, hash-verified

11
12class TestConfig(unittest.TestCase):
13 def load_temp_config(self, content):
14 """Write config to a temporary file and load it."""
15
16 with tempfile.NamedTemporaryFile() as f:
17 f.write(content.encode("utf8"))
18 f.flush()
19
20 return config.Config(Path(f.name))
21
22 def test_load_theme(self):
23 color_scheme = dict()

Calls 2

writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected