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

Function test_exit_from_assertrepr_compare

testing/test_assertion.py:1652–1659  ·  view source on GitHub ↗
(monkeypatch)

Source from the content-addressed store, hash-verified

1650
1651
1652def test_exit_from_assertrepr_compare(monkeypatch) -> None:
1653 def raise_exit(obj):
1654 outcomes.exit("Quitting debugger")
1655
1656 monkeypatch.setattr(util, "istext", raise_exit)
1657
1658 with pytest.raises(outcomes.Exit, match="Quitting debugger"):
1659 callequal(1, 1)
1660
1661
1662def test_assertion_location_with_coverage(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 2

callequalFunction · 0.85
setattrMethod · 0.80

Tested by

no test coverage detected