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

Function create_file

Lib/test/test_os.py:96–98  ·  view source on GitHub ↗
(filename, content=b'content')

Source from the content-addressed store, hash-verified

94
95
96def create_file(filename, content=b'content'):
97 with open(filename, "xb", 0) as fp:
98 fp.write(content)
99
100
101# bpo-41625: On AIX, splice() only works with a socket, not with a pipe.

Callers 15

test_large_readMethod · 0.70
test_large_readintoMethod · 0.70
test_replaceMethod · 0.70
test_copy_file_rangeMethod · 0.70
test_spliceMethod · 0.70
test_splice_offset_inMethod · 0.70
setUpMethod · 0.70
test_access_deniedMethod · 0.70
setUpMethod · 0.70
test_remove_partialMethod · 0.70

Calls 2

openFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected