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

Method from_tmpdir

Lib/test/support/venv.py:25–28  ·  view source on GitHub ↗
(cls, *, prefix=None, dir=None, **venv_create_args)

Source from the content-addressed store, hash-verified

23 @classmethod
24 @contextlib.contextmanager
25 def from_tmpdir(cls, *, prefix=None, dir=None, **venv_create_args):
26 delete = not bool(os.environ.get('PYTHON_TESTS_KEEP_VENV'))
27 with tempfile.TemporaryDirectory(prefix=prefix, dir=dir, delete=delete) as tmpdir:
28 yield cls(tmpdir, **venv_create_args)
29
30 @property
31 def prefix(self):

Callers 1

venvMethod · 0.80

Calls 2

clsClass · 0.50
getMethod · 0.45

Tested by

no test coverage detected