environment/lib/python2.7/site-packages/nose/selector.py
def wantFunction(self, function):
        """Is the function a test function?
        """
        try:
            if hasattr(function, 'compat_func_name'):
                funcname = function.compat_func_name
            else:
                funcname = function.__name__
        except AttributeError:
            # not a function
            return False
        declared = getattr(function, '__test__', None)
        if declared is not None:
            wanted = declared
        else:
            wanted = not funcname.startswith('_') and self.matches(funcname)
        plug_wants = self.plugins.wantFunction(function)
        if plug_wants is not None:
            wanted = plug_wants
        log.debug("wantFunction %s? %s", function, wanted)
        return wanted
def wantFunction(self, function):
        try:
            if hasattr(function, 'compat_func_name'):
                funcname = function.compat_func_name
            else:
                funcname = function.__name__
        except AttributeError:
            # not a function
            return False
        declared = getattr(function, '__test__', None)
        if declared is not None:
            wanted = declared
        else:
            wanted = not funcname.startswith('_') and self.matches(funcname)
        plug_wants = self.plugins.wantFunction(function)
        if plug_wants is not None:
            wanted = plug_wants
        log.debug("wantFunction %s? %s", function, wanted)
        return wanted
def wantFunction ( self , function ) : try : if hasattr ( function , 'compat_func_name' ) : funcname = function . compat_func_name else : funcname = function . __name__ except AttributeError : # not a function return False declared = getattr ( function , '__test__' , None ) if declared is not None : wanted = declared else : wanted = not funcname . startswith ( '_' ) and self . matches ( funcname ) plug_wants = self . plugins . wantFunction ( function ) if plug_wants is not None : wanted = plug_wants log . debug ( "wantFunction %s? %s" , function , wanted ) return wanted
Is the function a test function?
Is the function a test function?