Home
last modified time | relevance | path

Searched refs:expected_regex (Results 1 – 10 of 10) sorted by relevance

/external/python/cpython3/Lib/unittest/
Dcase.py167 def __init__(self, expected, test_case, expected_regex=None): argument
171 if expected_regex is not None:
172 expected_regex = re.compile(expected_regex)
173 self.expected_regex = expected_regex
234 if self.expected_regex is None:
237 expected_regex = self.expected_regex
238 if not expected_regex.search(str(exc_value)):
240 expected_regex.pattern, str(exc_value)))
279 if (self.expected_regex is not None and
280 not self.expected_regex.search(str(w))):
[all …]
/external/tensorflow/tensorflow/python/keras/mixed_precision/
Ddevice_compatibility_check_test.py41 def _test_compat_check(self, device_attr_list, should_warn, expected_regex, argument
48 self.assertRegex(mock_warn.call_args[0][0], expected_regex)
51 self.assertRegex(mock_info.call_args[0][0], expected_regex)
/external/tensorflow/tensorflow/python/framework/
Derror_interpolation_test.py253 expected_regex = (r"^;;;.*error_interpolation_test\.py:[0-9]+\) "
255 self.assertRegex(interpolated_string, expected_regex)
278 expected_regex = (r"^;;;.*error_interpolation_test\.py:[0-9]+\) "
280 self.assertRegex(interpolated_string, expected_regex)
290 expected_regex = re.compile(
293 self.assertRegex(interpolated_string, expected_regex)
Dops_test.py3245 expected_regex = r"device_func<.*ops_test.py, [0-9]+"
3246 self.assertRegex(func_description, expected_regex)
/external/tensorflow/tensorflow/python/training/experimental/
Dmixed_precision_test.py83 expected_regex = ('"opt" must be an instance of a '
86 expected_regex = ('"opt" must be an instance of a tf.train.Optimizer or '
88 with self.assertRaisesRegex(ValueError, expected_regex):
/external/python/cpython3/Lib/unittest/test/
Dtest_assertions.py199 for i, expected_regex in enumerate(errors):
207 expected_regex=expected_regex):
Dtest_loader.py394 expected_regex = r"Failed to import test module: abc \(\) //"
399 ImportError, expected_regex, getattr(test, 'abc () //'))
506 expected_regex = r"module 'unittest' has no attribute 'abc \(\) //'"
511 AttributeError, expected_regex, getattr(test, 'abc () //'))
813 expected_regex = r"Failed to import test module: abc \(\) //"
818 ImportError, expected_regex, getattr(test, 'abc () //'))
932 expected_regex = r"module 'unittest' has no attribute 'abc \(\) //'"
937 AttributeError, expected_regex, getattr(test, 'abc () //'))
/external/python/cpython3/Lib/test/
Dtest_type_comments.py231 def parse_all(self, source, minver=lowest, maxver=highest, expected_regex=""): argument
240 with self.assertRaisesRegex(SyntaxError, expected_regex,
285 expected_regex="^Cannot have two type comments on def"):
/external/tensorflow/tensorflow/python/keras/engine/
Dbase_layer_test.py263 expected_regex = (r'The following are legacy tf\.layers\.Layers:\n '
266 with self.assertRaisesRegex(TypeError, expected_regex):
270 with self.assertRaisesRegex(TypeError, expected_regex):
276 expected_regex = r'legacy tf\.layers\.Layers:\n {}'.format(layer[1])
277 with self.assertRaisesRegex(TypeError, expected_regex):
280 with self.assertRaisesRegex(TypeError, expected_regex):
284 with self.assertRaisesRegex(TypeError, expected_regex):
/external/python/ipaddress/
Dtest_ipaddress.py2138 def __init__(self, expected_exception, expected_regex): argument
2140 self.expected_regex = re.compile(expected_regex)
2160 if self.expected_regex is None:
2163 expected_regex = self.expected_regex
2164 if not expected_regex.search(str(exc_value)):
2166 expected_regex.pattern, str(exc_value)))