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

Method test_lastfailed_xpass

testing/test_cacheprovider.py:411–423  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

409 result.stdout.fnmatch_lines(["*2 failed*"])
410
411 def test_lastfailed_xpass(self, pytester: Pytester) -> None:
412 pytester.inline_runsource(
413 """
414 import pytest
415 @pytest.mark.xfail
416 def test_hello():
417 assert 1
418 """
419 )
420 config = pytester.parseconfigure()
421 assert config.cache is not None
422 lastfailed = config.cache.get("cache/lastfailed", -1)
423 assert lastfailed == -1
424
425 def test_non_serializable_parametrize(self, pytester: Pytester) -> None:
426 """Test that failed parametrized tests with unmarshable parameters

Callers

nothing calls this directly

Calls 3

inline_runsourceMethod · 0.45
parseconfigureMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected