MCPcopy Create free account
hub / github.com/ipython/ipython / NoBoolCall

Class NoBoolCall

IPython/core/tests/test_oinspect.py:134–145  ·  view source on GitHub ↗

callable with `__bool__` raising should still be inspect-able.

Source from the content-addressed store, hash-verified

132 raise Exception(name)
133
134class NoBoolCall:
135 """
136 callable with `__bool__` raising should still be inspect-able.
137 """
138
139 def __call__(self):
140 """does nothing"""
141 pass
142
143 def __bool__(self):
144 """just raise NotImplemented"""
145 raise NotImplementedError('Must be implemented')
146
147
148class SerialLiar(object):

Callers 1

test_bool_raiseFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_bool_raiseFunction · 0.68