Lines Matching defs:hook
880 # See addTearDownHook(self, hook) which allows the client to add a hook
1041 def addTearDownHook(self, hook):
1047 if callable(hook):
1049 print("Adding tearDown hook:", getsource_if_available(hook), file=sbuf)
1050 self.hooks.append(hook)
1087 # Check and run any hook functions.
1088 for hook in reversed(self.hooks):
1091 "Executing tearDown hook:", getsource_if_available(hook), file=sbuf
1093 if funcutils.requires_self(hook):
1094 hook(self)
1096 hook() # try the plain call and hope it works