Home
last modified time | relevance | path

Searched refs:assertRaisesRegex (Results 1 – 25 of 683) sorted by relevance

12345678910>>...28

/external/python/cpython3/Lib/test/
Dtest_positional_only_arg.py22 with self.assertRaisesRegex(SyntaxError, regex):
73 …with self.assertRaisesRegex(TypeError, r"f\(\) got some positional-only arguments passed as keywor…
77 …with self.assertRaisesRegex(TypeError, r"f\(\) got some positional-only arguments passed as keywor…
86 …with self.assertRaisesRegex(TypeError, r"f\(\) got some positional-only arguments passed as keywor…
90 …with self.assertRaisesRegex(TypeError, r"f\(\) got some positional-only arguments passed as keywor…
124 with self.assertRaisesRegex(TypeError, expected):
130 with self.assertRaisesRegex(TypeError, expected):
136 with self.assertRaisesRegex(TypeError, expected):
142 … with self.assertRaisesRegex(TypeError, r"f\(\) missing 1 required positional argument: 'c'"):
144 …with self.assertRaisesRegex(TypeError, r"f\(\) missing 2 required positional arguments: 'b' and 'c…
[all …]
Dtest_named_expressions.py10 with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
16 with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
22 with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
28 with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
34 with self.assertRaisesRegex(SyntaxError, "cannot use assignment expressions with tuple"):
40 with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
46 with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
52 with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
58 with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
64 with self.assertRaisesRegex(SyntaxError,
[all …]
Dtest_call.py34 self.assertRaisesRegex(TypeError, msg, {}.__contains__)
38 self.assertRaisesRegex(TypeError, msg, {}.__contains__, 0, 1)
42 self.assertRaisesRegex(TypeError, msg, int.from_bytes, b'a', 'little', False)
46 self.assertRaisesRegex(TypeError, msg, {}.get)
49 self.assertRaisesRegex(TypeError, msg, {}.__delattr__)
53 self.assertRaisesRegex(TypeError, msg, getattr)
57 self.assertRaisesRegex(TypeError, msg, input, 1, 2)
61 self.assertRaisesRegex(TypeError, msg, {}.get, 1, 2, 3)
65 self.assertRaisesRegex(TypeError, msg, {}.__contains__, x=2)
69 self.assertRaisesRegex(TypeError, msg, {}.__contains__, x=2, y=2)
[all …]
Dtest_wave.py123 with self.assertRaisesRegex(wave.Error,
129 with self.assertRaisesRegex(wave.Error,
135 with self.assertRaisesRegex(wave.Error,
142 with self.assertRaisesRegex(wave.Error,
149 with self.assertRaisesRegex(wave.Error, 'data chunk before fmt chunk'):
156 with self.assertRaisesRegex(wave.Error, 'unknown format: 2'):
163 with self.assertRaisesRegex(wave.Error, 'bad # of channels'):
170 with self.assertRaisesRegex(wave.Error, 'bad sample width'):
Dtest_dataclasses.py50 with self.assertRaisesRegex(ValueError, msg):
85 with self.assertRaisesRegex(TypeError,
94 with self.assertRaisesRegex(TypeError,
107 with self.assertRaisesRegex(TypeError,
140 with self.assertRaisesRegex(TypeError,
162 with self.assertRaisesRegex(TypeError,
283 with self.assertRaisesRegex(TypeError,
312 with self.assertRaisesRegex(TypeError,
349 with self.assertRaisesRegex(TypeError,
401 with self.assertRaisesRegex(TypeError,
[all …]
/external/fonttools/Tests/feaLib/
Dbuilder_test.py85 self.assertRaisesRegex = self.assertRaisesRegexp
199 self.assertRaisesRegex(
221 self.assertRaisesRegex(
267 self.assertRaisesRegex(
277 self.assertRaisesRegex(
283 self.assertRaisesRegex(
289 self.assertRaisesRegex(
294 self.assertRaisesRegex(
311 self.assertRaisesRegex(
322 self.assertRaisesRegex(
[all …]
Dparser_test.py60 self.assertRaisesRegex = self.assertRaisesRegexp
73 self.assertRaisesRegex(
77 self.assertRaisesRegex(
169 self.assertRaisesRegex(
205 self.assertRaisesRegex(
241 self.assertRaisesRegex(
268 self.assertRaisesRegex(
275 with self.assertRaisesRegex(FeatureLibError, "missing from the glyph set: ccc"):
284 self.assertRaisesRegex(
289 self.assertRaisesRegex(
[all …]
/external/minijail/tools/
Dparser_unittest.py102 with self.assertRaisesRegex(parser.ParseException,
133 with self.assertRaisesRegex(parser.ParseException,
136 with self.assertRaisesRegex(parser.ParseException,
149 with self.assertRaisesRegex(parser.ParseException,
152 with self.assertRaisesRegex(parser.ParseException, 'signed underflow'):
228 with self.assertRaisesRegex(parser.ParseException,
234 with self.assertRaisesRegex(parser.ParseException, 'empty complement'):
244 with self.assertRaisesRegex(parser.ParseException, 'empty constant'):
246 with self.assertRaisesRegex(parser.ParseException, 'empty constant'):
251 with self.assertRaisesRegex(parser.ParseException, 'invalid constant'):
[all …]
/external/python/funcsigs/tests/
Dtest_inspect.py30 self.assertRaisesRegex = self.assertRaisesRegexp
126 with self.assertRaisesRegex(ValueError, 'not supported by signature'):
128 with self.assertRaisesRegex(ValueError, 'not supported by signature'):
133 with self.assertRaisesRegex(ValueError, 'not supported by signature'):
138 with self.assertRaisesRegex(ValueError,
144 with self.assertRaisesRegex(TypeError, 'is not a callable object'):
147 with self.assertRaisesRegex(TypeError, 'is not a Python function'):
514 with self.assertRaisesRegex(TypeError, "is not a callable object"):
526 with self.assertRaisesRegex(ValueError, "not supported by signature"):
594 with self.assertRaisesRegex(TypeError, 'unhashable type'):
[all …]
/external/tensorflow/tensorflow/python/debug/cli/
Dcommand_parser_test.py124 with self.assertRaisesRegex(SyntaxError, "Redirect file path is empty"):
259 with self.assertRaisesRegex(
263 with self.assertRaisesRegex(
267 with self.assertRaisesRegex(
299 with self.assertRaisesRegex(ValueError,
303 with self.assertRaisesRegex(ValueError,
307 with self.assertRaisesRegex(ValueError,
311 with self.assertRaisesRegex(ValueError,
353 with self.assertRaisesRegex(
357 with self.assertRaisesRegex(
[all …]
/external/tensorflow/tensorflow/python/data/util/
Dnest_test.py61 with self.assertRaisesRegex(ValueError, "Structure is a scalar"):
64 with self.assertRaisesRegex(TypeError, "flat_sequence"):
194 with self.assertRaisesRegex(ValueError,
198 with self.assertRaisesRegex(ValueError,
202 with self.assertRaisesRegex(ValueError,
206 with self.assertRaisesRegex(ValueError,
220 with self.assertRaisesRegex(ValueError,
224 with self.assertRaisesRegex(ValueError,
230 with self.assertRaisesRegex(TypeError, "don't have the same sequence type"):
234 with self.assertRaisesRegex(ValueError, "don't have the same set of keys"):
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/linalg/
Dlinear_operator_algebra_test.py70 with self.assertRaisesRegex(TypeError, "must be callable"):
77 with self.assertRaisesRegex(ValueError, "has already been registered"):
105 with self.assertRaisesRegex(ValueError, "positive definite"):
108 with self.assertRaisesRegex(ValueError, "self adjoint"):
120 with self.assertRaisesRegex(TypeError, "must be callable"):
127 with self.assertRaisesRegex(ValueError, "has already been registered"):
164 with self.assertRaisesRegex(TypeError, "must be callable"):
172 with self.assertRaisesRegex(ValueError, "has already been registered"):
213 with self.assertRaisesRegex(TypeError, "must be callable"):
221 with self.assertRaisesRegex(ValueError, "has already been registered"):
[all …]
Dlinear_operator_zeros_test.py92 with self.assertRaisesRegex(ValueError, "must be a 0-D Tensor"):
94 with self.assertRaisesRegex(ValueError, "must be a 0-D Tensor"):
98 with self.assertRaisesRegex(TypeError, "must be integer"):
100 with self.assertRaisesRegex(TypeError, "must be integer"):
104 with self.assertRaisesRegex(ValueError, "must be non-negative"):
106 with self.assertRaisesRegex(ValueError, "must be non-negative"):
110 with self.assertRaisesRegex(ValueError, "must be a 1-D"):
114 with self.assertRaisesRegex(TypeError, "must be integer"):
118 with self.assertRaisesRegex(ValueError, "must be non-negative"):
156 with self.assertRaisesRegex(ValueError, "Dimensions.*not compatible"):
[all …]
/external/python/cpython3/Lib/tkinter/test/test_tkinter/
Dtest_geometry_managers.py29 with self.assertRaisesRegex(TclError, 'window "%s" isn\'t packed' % b):
31 with self.assertRaisesRegex(TclError, 'bad window path name ".foo"'):
62 with self.assertRaisesRegex(TclError, 'window "%s" isn\'t packed' % b):
64 with self.assertRaisesRegex(TclError, 'bad window path name ".foo"'):
111 with self.assertRaisesRegex(TclError,
114 with self.assertRaisesRegex(TclError, 'bad window path name ".foo"'):
229 with self.assertRaisesRegex(TclError, 'window "%s" isn\'t packed' % a):
295 with self.assertRaisesRegex(TclError, "can't place %s relative to "
300 with self.assertRaisesRegex(TclError, 'bad window path name'):
319 with self.assertRaisesRegex(TclError, 'bad screen distance "spam"'):
[all …]
/external/tensorflow/tensorflow/python/util/
Dfunction_parameter_canonicalizer_test.py58 with self.assertRaisesRegex(TypeError,
63 with self.assertRaisesRegex(TypeError,
69 with self.assertRaisesRegex(TypeError, 'Too many arguments were given'):
73 with self.assertRaisesRegex(TypeError,
78 with self.assertRaisesRegex(TypeError,
83 with self.assertRaisesRegex(
/external/tensorflow/tensorflow/python/keras/mixed_precision/
Dpolicy_test.py83 with self.assertRaisesRegex(
88 with self.assertRaisesRegex(
94 with self.assertRaisesRegex(TypeError,
99 with self.assertRaisesRegex(
105 with self.assertRaisesRegex(
110 with self.assertRaisesRegex(
115 with self.assertRaisesRegex(
167 with self.assertRaisesRegex(
173 with self.assertRaisesRegex(
310 with self.assertRaisesRegex(
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Dmanip_ops_test.py102 with self.assertRaisesRegex(errors_impl.InvalidArgumentError,
115 with self.assertRaisesRegex(ValueError,
126 with self.assertRaisesRegex(errors_impl.InvalidArgumentError,
133 with self.assertRaisesRegex(ValueError,
144 with self.assertRaisesRegex(errors_impl.InvalidArgumentError,
151 with self.assertRaisesRegex(ValueError,
162 with self.assertRaisesRegex(errors_impl.InvalidArgumentError,
169 with self.assertRaisesRegex(ValueError, "both shapes must be equal"):
179 with self.assertRaisesRegex(errors_impl.InvalidArgumentError,
188 with self.assertRaisesRegex(errors_impl.InvalidArgumentError,
Dsparse_to_dense_op_py_test.py78 with self.assertRaisesRegex((ValueError, errors.InvalidArgumentError),
83 with self.assertRaisesRegex((ValueError, errors.InvalidArgumentError),
89 with self.assertRaisesRegex(
95 with self.assertRaisesRegex((ValueError, errors.InvalidArgumentError),
100 with self.assertRaisesRegex(
106 with self.assertRaisesRegex((ValueError, errors.InvalidArgumentError),
114 with self.assertRaisesRegex((ValueError, errors.InvalidArgumentError),
125 with self.assertRaisesRegex((ValueError, errors.InvalidArgumentError),
/external/tensorflow/tensorflow/python/distribute/
Dmulti_worker_util_test.py74 with self.assertRaisesRegex(
97 with self.assertRaisesRegex(
101 with self.assertRaisesRegex(
138 with self.assertRaisesRegex(
148 with self.assertRaisesRegex(ValueError, "Unexpected `task_type` 'ps'"):
190 with self.assertRaisesRegex(ValueError,
198 with self.assertRaisesRegex(ValueError,
260 with self.assertRaisesRegex(
/external/fonttools/Tests/cffLib/
Dspecializer_test.py35 self.assertRaisesRegex = self.assertRaisesRegexp
40 with self.assertRaisesRegex(ValueError, r'\[\]'):
45 with self.assertRaisesRegex(ValueError, r'\[\]'):
50 with self.assertRaisesRegex(ValueError, r'\[\]'):
55 with self.assertRaisesRegex(ValueError, r'\[\]'):
60 with self.assertRaisesRegex(ValueError, r'\[\]'):
65 with self.assertRaisesRegex(ValueError, r'\[\]'):
70 with self.assertRaisesRegex(ValueError, r'\[\]'):
75 with self.assertRaisesRegex(ValueError, r'\[\]'):
80 with self.assertRaisesRegex(ValueError, r'\[\]'):
[all …]
/external/tensorflow/tensorflow/python/ops/ragged/
Dragged_from_sparse_op_test.py54 self.assertRaisesRegex(ValueError, r'rank\(st_input\) must be 2',
59 self.assertRaisesRegex(ValueError, r'rank\(st_input\) must be 2',
67 self.assertRaisesRegex(ValueError, r'rank\(st_input\) must be 2',
94 with self.assertRaisesRegex(errors.InvalidArgumentError,
100 with self.assertRaisesRegex(errors.InvalidArgumentError,
106 with self.assertRaisesRegex(errors.InvalidArgumentError,
Dragged_row_splits_to_segment_ids_op_test.py42 self.assertRaisesRegex(ValueError, r'Invalid row_splits: \[\]',
44 self.assertRaisesRegex(ValueError, r'splits must have dtype int32 or int64',
47 self.assertRaisesRegex(ValueError, r'Shape \(\) must have rank 1',
49 self.assertRaisesRegex(ValueError, r'Shape \(1, 1\) must have rank 1',
/external/tensorflow/tensorflow/python/kernel_tests/distributions/
Dbijector_test.py39 with self.assertRaisesRegex(TypeError,
68 with self.assertRaisesRegex(NotImplementedError, "inverse not implemented"):
71 with self.assertRaisesRegex(NotImplementedError, "forward not implemented"):
74 with self.assertRaisesRegex(NotImplementedError,
78 with self.assertRaisesRegex(NotImplementedError,
122 with self.assertRaisesRegex(ValueError, "Expected integer"):
124 with self.assertRaisesRegex(ValueError, "Expected integer"):
129 with self.assertRaisesRegex(ValueError, "Expected scalar"):
131 with self.assertRaisesRegex(ValueError, "Expected scalar"):
249 with self.assertRaisesRegex(ValueError, "must be larger than"):
[all …]
/external/tensorflow/tensorflow/python/keras/preprocessing/
Dtext_dataset_test.py203 with self.assertRaisesRegex(ValueError, 'No text files found.'):
209 with self.assertRaisesRegex(ValueError, '`labels` argument should be'):
213 with self.assertRaisesRegex(ValueError, '`label_mode` argument must be'):
217 with self.assertRaisesRegex(
223 with self.assertRaisesRegex(
229 with self.assertRaisesRegex(
234 with self.assertRaisesRegex(ValueError, 'there must exactly 2 classes'):
238 with self.assertRaisesRegex(ValueError,
243 with self.assertRaisesRegex(ValueError,
248 with self.assertRaisesRegex(ValueError, '`validation_split` must be set'):
[all …]
/external/tensorflow/tensorflow/python/saved_model/
Dsave_context_test.py32 with self.assertRaisesRegex(ValueError, 'not in a SaveContext'):
45 with self.assertRaisesRegex(ValueError, 'not in a SaveContext'):
57 with self.assertRaisesRegex(ValueError, 'not in a SaveContext'):
75 with self.assertRaisesRegex(ValueError, 'not in a SaveContext'):
80 with self.assertRaisesRegex(ValueError, 'already in a SaveContext'):

12345678910>>...28