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

Function test_pytest_fail

testing/test_runner.py:652–656  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

650
651
652def test_pytest_fail() -> None:
653 with pytest.raises(pytest.fail.Exception) as excinfo:
654 pytest.fail("hello")
655 s = excinfo.exconly(tryshort=True)
656 assert s.startswith("Failed")
657
658
659def test_pytest_exit_msg(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 2

failMethod · 0.80
exconlyMethod · 0.80

Tested by

no test coverage detected