def __init__(self, method, test=None, arg=tuple(), descriptor=None):
        """Initialize the MethodTestCase.

        Required argument:

        * method -- the method to call, may be bound or unbound. In either
          case, a new instance of the method's class will be instantiated to
	  make the call.  Note: In Python 3.x, if using an unbound method, you
	  must wrap it using pyversion.unbound_method.

        Optional arguments:

        * test -- the test function to call. If this is passed, it will be
          called instead of getting a new bound method of the same name as the
          desired method from the test instance. This is to support generator
          methods that yield inline functions.

        * arg -- arguments to pass to the test function. This is to support
          generator methods that yield arguments.

        * descriptor -- the function, other than the test, that should be used
          to construct the test name. This is to support generator methods.
        """
        self.method = method
        self.test = test
        self.arg = arg
        self.descriptor = descriptor
        if isfunction(method):
            raise ValueError("Unbound methods must be wrapped using pyversion.unbound_method before passing to MethodTestCase")
        self.cls = method.im_class
        self.inst = self.cls()
        if self.test is None:
            method_name = self.method.__name__
            self.test = getattr(self.inst, method_name)
        TestBase.__init__(self)
def __init__ ( self , method , test = None , arg = tuple ( ) , descriptor = None ) : self . method = method self . test = test self . arg = arg self . descriptor = descriptor if isfunction ( method ) : raise ValueError ( "Unbound methods must be wrapped using pyversion.unbound_method before passing to MethodTestCase" ) self . cls = method . im_class self . inst = self . cls ( ) if self . test is None : method_name = self . method . __name__ self . test = getattr ( self . inst , method_name ) TestBase . __init__ ( self )
Initialize the MethodTestCase.

        Required argument:

        * method -- the method to call, may be bound or unbound. In either
          case, a new instance of the method's class will be instantiated to
	  make the call.  Note: In Python 3.x, if using an unbound method, you
	  must wrap it using pyversion.unbound_method.

        Optional arguments:

        * test -- the test function to call. If this is passed, it will be
          called instead of getting a new bound method of the same name as the
          desired method from the test instance. This is to support generator
          methods that yield inline functions.

        * arg -- arguments to pass to the test function. This is to support
          generator methods that yield arguments.

        * descriptor -- the function, other than the test, that should be used
          to construct the test name. This is to support generator methods.