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

Function test_raise_assertion_error_raisin_repr

testing/test_assertion.py:1619–1632  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

1617
1618
1619def test_raise_assertion_error_raisin_repr(pytester: Pytester) -> None:
1620 pytester.makepyfile(
1621 """
1622 class RaisingRepr(object):
1623 def __repr__(self):
1624 raise Exception()
1625 def test_raising_repr():
1626 raise AssertionError(RaisingRepr())
1627 """
1628 )
1629 result = pytester.runpytest()
1630 result.stdout.fnmatch_lines(
1631 ["E AssertionError: <unprintable AssertionError object>"]
1632 )
1633
1634
1635def test_issue_1944(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected