MCPcopy Index your code
hub / github.com/ipython/ipython / count_failures

Function count_failures

IPython/testing/ipunittest.py:49–61  ·  view source on GitHub ↗

Count number of failures in a doctest runner. Code modeled after the summarize() method in doctest.

(runner)

Source from the content-addressed store, hash-verified

47#-----------------------------------------------------------------------------
48
49def count_failures(runner):
50 """Count number of failures in a doctest runner.
51
52 Code modeled after the summarize() method in doctest.
53 """
54 if sys.version_info < (3, 13):
55 return [TestResults(f, t) for f, t in runner._name2ft.values() if f > 0]
56 else:
57 return [
58 TestResults(failure, try_)
59 for failure, try_, skip in runner._stats.values()
60 if failure > 0
61 ]
62
63
64class IPython2PythonConverter:

Callers 1

testMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…