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

Method report_failure

testing/python/approx.py:37–42  ·  view source on GitHub ↗
(self, out, test, example, got)

Source from the content-addressed store, hash-verified

35
36 class MyDocTestRunner(doctest.DocTestRunner):
37 def report_failure(self, out, test, example, got):
38 raise AssertionError(
39 "'{}' evaluates to '{}', not '{}'".format(
40 example.source.strip(), got.strip(), example.want.strip()
41 )
42 )
43
44 return MyDocTestRunner()
45

Callers

nothing calls this directly

Calls 2

stripMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected