MCPcopy
hub / github.com/pytest-dev/pytest / mkdtemp

Method mkdtemp

src/_pytest/_py/path.py:1263–1272  ·  view source on GitHub ↗

Return a Path object pointing to a fresh new temporary directory (which we created ourselves).

(cls, rootdir=None)

Source from the content-addressed store, hash-verified

1261
1262 @classmethod
1263 def mkdtemp(cls, rootdir=None):
1264 """Return a Path object pointing to a fresh new temporary directory
1265 (which we created ourselves).
1266 """
1267 import tempfile
1268
1269 if rootdir is None:
1270 rootdir = cls.get_temproot()
1271 path = error.checked_call(tempfile.mkdtemp, dir=str(rootdir))
1272 return cls(path)
1273
1274 @classmethod
1275 def make_numbered_dir(

Callers 6

_make_cachedirFunction · 0.80
test_mkdtemp_creationMethod · 0.80
test_tmprootMethod · 0.80
test_mkdtemp_rootdirFunction · 0.80

Calls 3

clsFunction · 0.85
get_temprootMethod · 0.80
checked_callMethod · 0.80