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

Function test_raise_unprintable_assertion_error

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

Source from the content-addressed store, hash-verified

1604
1605
1606def test_raise_unprintable_assertion_error(pytester: Pytester) -> None:
1607 pytester.makepyfile(
1608 r"""
1609 def test_raise_assertion_error():
1610 raise AssertionError('\xff')
1611 """
1612 )
1613 result = pytester.runpytest()
1614 result.stdout.fnmatch_lines(
1615 [r"> raise AssertionError('\xff')", "E AssertionError: *"]
1616 )
1617
1618
1619def test_raise_assertion_error_raisin_repr(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