(pytester: Pytester)
| 293 | |
| 294 | |
| 295 | def 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=""" |
| 303 | import pytest |
| 304 | |
| 305 | @pytest.hookimpl(tryfirst=True) |
| 306 | def pytest_configure(config) -> None: |
| 307 | config.workerinput = True |
| 308 | """ |
| 309 | ) |
| 310 | pytester.makepyfile( |
| 311 | test_one=""" |
| 312 | def 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 | |
| 325 | def test_disabled_stepwise_xdist_dont_clear_cache(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…