Searched refs:expected_regexp (Results 1 – 6 of 6) sorted by relevance
/aosp_15_r20/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 …]
|
/aosp_15_r20/external/python/mobly/mobly/ |
D | asserts.py | 468 def __init__(self, expected, expected_regexp=None, extras=None): argument 471 self.expected_regexp = expected_regexp 488 if self.expected_regexp is None: 491 expected_regexp = self.expected_regexp 492 if isinstance(expected_regexp, str): 493 expected_regexp = re.compile(expected_regexp) 494 if not expected_regexp.search(str(exc_value)): 497 % (expected_regexp.pattern, str(exc_value)),
|
/aosp_15_r20/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 …]
|
/aosp_15_r20/external/python/cpython2/Lib/unittest/test/ |
D | test_assertions.py | 159 for i, expected_regexp in enumerate(errors): 167 expected_regexp=expected_regexp):
|
/aosp_15_r20/external/tensorflow/tensorflow/python/kernel_tests/control_flow/ |
H A 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)
|
/aosp_15_r20/external/pytorch/torch/_numpy/testing/ |
H A D | utils.py | 1127 def assert_raises_regex(exception_class, expected_regexp, *args, **kwargs): argument 1145 return _d.assertRaisesRegex(exception_class, expected_regexp, *args, **kwargs)
|