Searched refs:expected_regexp (Results 1 – 5 of 5) sorted by relevance
| /external/python/asn1crypto/tests/ |
| D | _unittest_compat.py | 89 def _assert_regex(self, text, expected_regexp, msg=None): argument 91 if isinstance(expected_regexp, str_cls): 92 expected_regexp = re.compile(expected_regexp) 93 if not expected_regexp.search(text): 95 msg = '%s: %r not found in %r' % (msg, expected_regexp.pattern, text) 107 def _assert_raises_regex(self, expected_exception, expected_regexp, callable_obj=None, *args, **kwa… argument 108 if expected_regexp is not None: 109 expected_regexp = re.compile(expected_regexp) 110 context = _AssertRaisesContext(expected_exception, self, expected_regexp) 118 def __init__(self, expected, test_case, expected_regexp=None): argument [all …]
|
| /external/python/mobly/mobly/ |
| D | asserts.py | 502 def __init__(self, expected, expected_regexp=None, extras=None): argument 505 self.expected_regexp = expected_regexp 522 if self.expected_regexp is None: 525 expected_regexp = self.expected_regexp 526 if isinstance(expected_regexp, str): 527 expected_regexp = re.compile(expected_regexp) 528 if not expected_regexp.search(str(exc_value)): 530 (expected_regexp.pattern, str(exc_value)),
|
| /external/python/cpython2/Lib/unittest/ |
| D | case.py | 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) [all …]
|
| /external/python/cpython2/Lib/unittest/test/ |
| D | test_assertions.py | 159 for i, expected_regexp in enumerate(errors): 167 expected_regexp=expected_regexp):
|
| /external/tensorflow/tensorflow/python/kernel_tests/control_flow/ |
| D | py_func_test.py | 64 expected_regexp = r": blah.*" # Error at the top 65 expected_regexp += r"in raise_exception.*" # Stacktrace outer 66 expected_regexp += r"in inner_exception.*" # Stacktrace inner 67 expected_regexp += r": blah" # Stacktrace of raise 69 return re.search(expected_regexp, str(exception), re.DOTALL)
|