environment/lib/python2.7/site-packages/nose/plugins/attrib.py
def validateAttrib(self, method, cls = None):
        """Verify whether a method has the required attributes
        The method is considered a match if it matches all attributes
        for any attribute group.
        ."""
        # TODO: is there a need for case-sensitive value comparison?
        any = False
        for group in self.attribs:
            match = True
            for key, value in group:
                attr = get_method_attr(method, cls, key)
                if callable(value):
                    if not value(key, method, cls):
                        match = False
                        break
                elif value is True:
                    # value must exist and be True
                    if not bool(attr):
                        match = False
                        break
                elif value is False:
                    # value must not exist or be False
                    if bool(attr):
                        match = False
                        break
                elif type(attr) in (list, tuple):
                    # value must be found in the list attribute
                    if not str(value).lower() in [str(x).lower()
                                                  for x in attr]:
                        match = False
                        break
                else:
                    # value must match, convert to string and compare
                    if (value != attr
                        and str(value).lower() != str(attr).lower()):
                        match = False
                        break
            any = any or match
        if any:
            # not True because we don't want to FORCE the selection of the
            # item, only say that it is acceptable
            return None
        return False
def validateAttrib(self, method, cls = None):
        # TODO: is there a need for case-sensitive value comparison?
        any = False
        for group in self.attribs:
            match = True
            for key, value in group:
                attr = get_method_attr(method, cls, key)
                if callable(value):
                    if not value(key, method, cls):
                        match = False
                        break
                elif value is True:
                    # value must exist and be True
                    if not bool(attr):
                        match = False
                        break
                elif value is False:
                    # value must not exist or be False
                    if bool(attr):
                        match = False
                        break
                elif type(attr) in (list, tuple):
                    # value must be found in the list attribute
                    if not str(value).lower() in [str(x).lower()
                                                  for x in attr]:
                        match = False
                        break
                else:
                    # value must match, convert to string and compare
                    if (value != attr
                        and str(value).lower() != str(attr).lower()):
                        match = False
                        break
            any = any or match
        if any:
            # not True because we don't want to FORCE the selection of the
            # item, only say that it is acceptable
            return None
        return False
def validateAttrib ( self , method , cls = None ) : # TODO: is there a need for case-sensitive value comparison? any = False for group in self . attribs : match = True for key , value in group : attr = get_method_attr ( method , cls , key ) if callable ( value ) : if not value ( key , method , cls ) : match = False break elif value is True : # value must exist and be True if not bool ( attr ) : match = False break elif value is False : # value must not exist or be False if bool ( attr ) : match = False break elif type ( attr ) in ( list , tuple ) : # value must be found in the list attribute if not str ( value ) . lower ( ) in [ str ( x ) . lower ( ) for x in attr ] : match = False break else : # value must match, convert to string and compare if ( value != attr and str ( value ) . lower ( ) != str ( attr ) . lower ( ) ) : match = False break any = any or match if any : # not True because we don't want to FORCE the selection of the # item, only say that it is acceptable return None return False
Verify whether a method has the required attributes
        The method is considered a match if it matches all attributes
        for any attribute group.
        .
Verify whether a method has the required attributes The method is considered a match if it matches all attributes for any attribute group . .