Skip to content
Snippets Groups Projects
Commit 52cee44a authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

testing: add a `write_file` function

The function is kinda trivial, but having a simple function avoid silly mistake.

Differential Revision: https://phab.mercurial-scm.org/D10477
parent 99c62910
No related branches found
No related tags found
No related merge requests found
......@@ -28,3 +28,8 @@
if time.time() - start > timeout:
raise RuntimeError(b"timed out waiting for file: %s" % path)
time.sleep(0.01)
def write_file(path, content=b''):
with open(path, 'wb') as f:
f.write(content)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment