Lines Matching refs:expected_regexp
101 def __init__(self, expected, test_case, expected_regexp=None): argument
104 self.expected_regexp = expected_regexp
121 if self.expected_regexp is None:
124 expected_regexp = self.expected_regexp
125 if not expected_regexp.search(str(exc_value)):
127 (expected_regexp.pattern, str(exc_value)))
976 def assertRaisesRegexp(self, expected_exception, expected_regexp, argument
988 if expected_regexp is not None:
989 expected_regexp = re.compile(expected_regexp)
990 context = _AssertRaisesContext(expected_exception, self, expected_regexp)
996 def assertRegexpMatches(self, text, expected_regexp, msg=None): argument
998 if isinstance(expected_regexp, basestring):
999 expected_regexp = re.compile(expected_regexp)
1000 if not expected_regexp.search(text):
1002 msg = '%s: %r not found in %r' % (msg, expected_regexp.pattern, text)