MCPcopy
hub / github.com/python/mypy / make_file

Method make_file

mypy/test/testfscache.py:90–97  ·  view source on GitHub ↗
(self, path: str, base: str | None = None)

Source from the content-addressed store, hash-verified

88 assert self.isfile_case(os.path.join(other, "PKG/other_dir.py"))
89
90 def make_file(self, path: str, base: str | None = None) -> None:
91 if base is None:
92 base = self.tempdir
93 fullpath = os.path.join(base, path)
94 os.makedirs(os.path.dirname(fullpath), exist_ok=True)
95 if not path.endswith("/"):
96 with open(fullpath, "w") as f:
97 f.write("# test file")
98
99 def isfile_case(self, path: str) -> bool:
100 return self.fscache.isfile_case(os.path.join(self.tempdir, path), self.tempdir)

Callers 4

test_isfile_case_1Method · 0.95
test_isfile_case_2Method · 0.95
test_isfile_case_3Method · 0.95

Calls 3

joinMethod · 0.45
endswithMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected