From 04b8111f8f765a4f4c6b0ca0ab80a6fd031221c7 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Thu, 9 Oct 2014 09:55:46 +0200 Subject: [PATCH] improve docstring, remove unused custom Exception --- _pytest/core.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/_pytest/core.py b/_pytest/core.py index f6377f912..316a9102a 100644 --- a/_pytest/core.py +++ b/_pytest/core.py @@ -93,7 +93,9 @@ def add_method_wrapper(cls, wrapper_func): def wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator. The first yield will trigger calling the function and receive an according CallOutcome - object representing an exception or a result. + object representing an exception or a result. The generator then + needs to finish (raise StopIteration) in order for the wrapped call + to complete. """ try: next(wrap_controller) # first yield @@ -362,13 +364,6 @@ def importplugin(importspec): class MultiCall: """ execute a call into multiple python functions/methods. """ - class WrongHookWrapper(Exception): - """ a hook wrapper does not behave correctly. """ - def __init__(self, func, message): - Exception.__init__(self, func, message) - self.func = func - self.message = message - def __init__(self, methods, kwargs, firstresult=False): self.methods = list(methods) self.kwargs = kwargs