MCPcopy Create free account
hub / github.com/pytest-dev/pytest / _mk_tmp

Function _mk_tmp

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

Source from the content-addressed store, hash-verified

187
188
189def _mk_tmp(request: FixtureRequest, factory: TempPathFactory) -> Path:
190 name = request.node.name
191 name = re.sub(r"[\W]", "_", name)
192 MAXVAL = 30
193 name = name[:MAXVAL]
194 return factory.mktemp(name, numbered=True)
195
196
197@fixture

Callers 1

tmp_pathFunction · 0.85

Calls 1

mktempMethod · 0.45

Tested by

no test coverage detected