MCPcopy Index your code
hub / github.com/python/cpython / create_writable_file

Method create_writable_file

Lib/test/test_argparse.py:129–133  ·  view source on GitHub ↗
(self, filename)

Source from the content-addressed store, hash-verified

127 shutil.rmtree(self.temp_dir, True)
128
129 def create_writable_file(self, filename):
130 file_path = os.path.join(self.temp_dir, filename)
131 with open(file_path, 'w', encoding="utf-8") as file:
132 file.write(filename)
133 return file_path
134
135 def create_readonly_file(self, filename):
136 os.chmod(self.create_writable_file(filename), stat.S_IREAD)

Callers 3

create_readonly_fileMethod · 0.95
setUpMethod · 0.80
setUpMethod · 0.80

Calls 3

openFunction · 0.50
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected