MCPcopy Index your code
hub / github.com/python/cpython / local_fail

Method local_fail

Tools/clinic/libclinic/language.py:72–78  ·  view source on GitHub ↗
(should_be_there_but_isnt: bool)

Source from the content-addressed store, hash-verified

70 fcf = libclinic.FormatCounterFormatter()
71 fcf.format(line)
72 def local_fail(should_be_there_but_isnt: bool) -> None:
73 if should_be_there_but_isnt:
74 fail("{} {} must contain {{{}}} exactly once!".format(
75 self.__class__.__name__, attr, name))
76 else:
77 fail("{} {} must not contain {{{}}}!".format(
78 self.__class__.__name__, attr, name))
79
80 for name, count in fcf.counts.items():
81 if name in fields:

Callers

nothing calls this directly

Calls 2

failFunction · 0.90
formatMethod · 0.45

Tested by

no test coverage detected