MCPcopy Create free account
hub / github.com/datacamp/pythonwhat / write_file

Function write_file

tests/test_local.py:98–102  ·  view source on GitHub ↗
(path, name, content)

Source from the content-addressed store, hash-verified

96
97
98def write_file(path, name, content):
99 os.makedirs(path)
100 with ChDir(path):
101 with open(name, "w") as f:
102 f.write(content)
103
104
105def test_run_relative_working_dir():

Callers 4

test_run_solution_dirFunction · 0.85

Calls 1

ChDirClass · 0.90

Tested by

no test coverage detected