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

Function _mk_tmp

src/_pytest/tmpdir.py:282–287  ·  view source on GitHub ↗
(request: FixtureRequest, factory: TempPathFactory)

Source from the content-addressed store, hash-verified

280
281
282def _mk_tmp(request: FixtureRequest, factory: TempPathFactory) -> Path:
283 name = request.node.name
284 name = re.sub(r"[\W]", "_", name)
285 MAXVAL = 30
286 name = name[:MAXVAL]
287 return factory.mktemp(name, numbered=True)
288
289
290@fixture

Callers 1

tmp_pathFunction · 0.85

Calls 1

mktempMethod · 0.45

Tested by

no test coverage detected