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

Method mktemp

Lib/test/test_glob.py:22–27  ·  view source on GitHub ↗
(self, *parts)

Source from the content-addressed store, hash-verified

20 return [os.path.join(self.tempdir, *parts) for parts in tuples]
21
22 def mktemp(self, *parts):
23 filename = self.norm(*parts)
24 base, file = os.path.split(filename)
25 if not os.path.exists(base):
26 os.makedirs(base)
27 create_empty_file(filename)
28
29 def setUp(self):
30 self.tempdir = TESTFN + "_dir"

Callers 15

setUpMethod · 0.95
run_testsFunction · 0.80
temporary_filenameFunction · 0.80
setUpMethod · 0.80
setUpMethod · 0.80
test_bytearray_apiMethod · 0.80
scriptMethod · 0.80
test_rmtree_errorsMethod · 0.80
test_chownMethod · 0.80
test_move_dirMethod · 0.80
test_non_existent_srcMethod · 0.80

Calls 4

normMethod · 0.95
create_empty_fileFunction · 0.90
splitMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected