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

Method rlf

testing/test_cacheprovider.py:534–542  ·  testing/test_cacheprovider.py::TestLastFailed.rlf
(fail_import: int, fail_run: int)

Source from the content-addressed store, hash-verified

532 )
533
534 def rlf(fail_import: int, fail_run: int) -> Any:
535 monkeypatch.setenv(class="st">"FAILIMPORT", str(fail_import))
536 monkeypatch.setenv(class="st">"FAILTEST", str(fail_run))
537
538 pytester.runpytest(class="st">"-q")
539 config = pytester.parseconfigure()
540 assert config.cache is not None
541 lastfailed = config.cache.get(class="st">"cache/lastfailed", -1)
542 return lastfailed
543
544 lastfailed = rlf(fail_import=0, fail_run=0)
545 assert lastfailed == -1

Callers

nothing calls this directly

Calls 4

setenvMethod · 0.80
runpytestMethod · 0.45
parseconfigureMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected