Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
98
def
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
105
def
test_run_relative_working_dir():
Callers
4
test_run_relative_working_dir
Function · 0.85
test_run_solution_dir
Function · 0.85
test_run_with_absolute_dir
Function · 0.85
test_run_custom_solution_dir
Function · 0.85
Calls
1
ChDir
Class · 0.90
Tested by
no test coverage detected