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

Method mkdtemp

Lib/test/test_shutil.py:174–181  ·  view source on GitHub ↗

Create a temporary directory that will be cleaned up. Returns the path of the directory.

(self, prefix=None)

Source from the content-addressed store, hash-verified

172class BaseTest:
173
174 def mkdtemp(self, prefix=None):
175 """Create a temporary directory that will be cleaned up.
176
177 Returns the path of the directory.
178 """
179 d = tempfile.mkdtemp(prefix=prefix, dir=os.getcwd())
180 self.addCleanup(os_helper.rmtree, d)
181 return d
182
183
184class TestRmTree(BaseTest, unittest.TestCase):

Callers 15

setUpMethod · 0.80
test_no_leakingMethod · 0.80
test_umaskMethod · 0.80
test_getoutputMethod · 0.80
setUpMethod · 0.80
setUpMethod · 0.80
setUpMethod · 0.80
setUpMethod · 0.80
create_initMethod · 0.80
setUpMethod · 0.80
_make_pkgMethod · 0.80
mkhierMethod · 0.80

Calls 1

addCleanupMethod · 0.80

Tested by

no test coverage detected