Lines Matching refs:matchAgainst
931 for attr, matchAgainst in self.attrs.items():
940 if not self._matches(attrValue, matchAgainst):
977 def _matches(self, markup, matchAgainst): argument
980 if matchAgainst is True:
982 elif callable(matchAgainst):
983 result = matchAgainst(markup)
992 if hasattr(matchAgainst, 'match'):
994 result = markup and matchAgainst.search(markup)
995 elif hasattr(matchAgainst, '__iter__'): # list-like
996 result = markup in matchAgainst
997 elif hasattr(matchAgainst, 'items'):
998 result = markup.has_key(matchAgainst)
999 elif matchAgainst and isinstance(markup, basestring):
1001 matchAgainst = unicode(matchAgainst)
1003 matchAgainst = str(matchAgainst)
1006 result = matchAgainst == markup