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

Method create_writable_file

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

Source from the content-addressed store, hash-verified

107 shutil.rmtree(self.temp_dir, True)
108
109 def create_writable_file(self, filename):
110 file_path = os.path.join(self.temp_dir, filename)
111 with open(file_path, 'w', encoding="utf-8") as file:
112 file.write(filename)
113 return file_path
114
115 def create_readonly_file(self, filename):
116 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