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

Function test_stepwise_xdist_dont_store_lastfailed

testing/test_stepwise.py:295–322  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

293
294
295def test_stepwise_xdist_dont_store_lastfailed(pytester: Pytester) -> None:
296 pytester.makefile(
297 ext=".ini",
298 pytest=f"[pytest]\ncache_dir = {pytester.path}\n",
299 )
300
301 pytester.makepyfile(
302 conftest="""
303import pytest
304
305@pytest.hookimpl(tryfirst=True)
306def pytest_configure(config) -> None:
307 config.workerinput = True
308"""
309 )
310 pytester.makepyfile(
311 test_one="""
312def test_one():
313 assert False
314"""
315 )
316 result = pytester.runpytest("--stepwise")
317 assert result.ret == pytest.ExitCode.INTERRUPTED
318
319 stepwise_cache_file = (
320 pytester.path / Cache._CACHE_PREFIX_VALUES / STEPWISE_CACHE_DIR
321 )
322 assert not Path(stepwise_cache_file).exists()
323
324
325def test_disabled_stepwise_xdist_dont_clear_cache(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 4

makefileMethod · 0.45
makepyfileMethod · 0.45
runpytestMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…