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

Class Okay

IPython/core/tests/test_hooks.py:19–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17# Define two classes, one which succeeds and one which raises TryNext. Each
18# sets the attribute `called` to True when it is called.
19class Okay(object):
20 def __init__(self, message):
21 self.message = message
22 self.called = False
23 def __call__(self):
24 self.called = True
25 return self.message
26
27class Fail(object):
28 def __init__(self, message):

Calls

no outgoing calls