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

Function test_tmp_path_factory

testing/test_tmpdir.py:155–167  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

153
154
155def test_tmp_path_factory(pytester: Pytester) -> None:
156 pytester.makepyfile(
157 """
158 import pytest
159 @pytest.fixture(scope='session')
160 def session_dir(tmp_path_factory):
161 return tmp_path_factory.mktemp('data', numbered=False)
162 def test_some(session_dir):
163 assert session_dir.is_dir()
164 """
165 )
166 reprec = pytester.inline_run()
167 reprec.assertoutcome(passed=1)
168
169
170def test_tmp_path_fallback_tox_env(pytester: Pytester, monkeypatch) -> None:

Callers

nothing calls this directly

Calls 3

assertoutcomeMethod · 0.80
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected