Lines Matching refs:expected_regexp
116 def __init__(self, expected, test_case, expected_regexp=None): argument
119 self.expected_regexp = expected_regexp
136 if self.expected_regexp is None:
139 expected_regexp = self.expected_regexp
140 if isinstance(expected_regexp, basestring):
141 expected_regexp = re.compile(expected_regexp)
142 if not expected_regexp.search(str(exc_value)):
144 (expected_regexp.pattern, str(exc_value)))
991 def assertRaisesRegexp(self, expected_exception, expected_regexp, argument
1004 return _AssertRaisesContext(expected_exception, self, expected_regexp)
1008 if isinstance(expected_regexp, basestring):
1009 expected_regexp = re.compile(expected_regexp)
1010 if not expected_regexp.search(str(exc_value)):
1012 (expected_regexp.pattern, str(exc_value)))
1021 def assertRegexpMatches(self, text, expected_regexp, msg=None): argument
1023 if isinstance(expected_regexp, basestring):
1024 expected_regexp = re.compile(expected_regexp)
1025 if not expected_regexp.search(text):
1027 msg = '%s: %r not found in %r' % (msg, expected_regexp.pattern, text)