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

Method test_lastfailed_xpass

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

Source from the content-addressed store, hash-verified

389 result.stdout.fnmatch_lines(["*2 failed*"])
390
391 def test_lastfailed_xpass(self, pytester: Pytester) -> None:
392 pytester.inline_runsource(
393 """
394 import pytest
395 @pytest.mark.xfail
396 def test_hello():
397 assert 1
398 """
399 )
400 config = pytester.parseconfigure()
401 assert config.cache is not None
402 lastfailed = config.cache.get("cache/lastfailed", -1)
403 assert lastfailed == -1
404
405 def test_non_serializable_parametrize(self, pytester: Pytester) -> None:
406 """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