/external/python/cpython2/Lib/test/ |
D | test_call.py | 12 self.assertRaises(TypeError, {}.has_key) 19 self.assertRaises(TypeError, {}.has_key, 0, 1) 24 except TypeError: 35 except TypeError: 41 self.assertRaises(TypeError, {}.has_key, x=2) 44 self.assertRaises(TypeError, {}.has_key, x=2) 47 self.assertRaises(TypeError, {}.has_key, x=2, y=2) 53 self.assertRaises(TypeError, {}.keys, 0) 56 self.assertRaises(TypeError, {}.keys, 0, 1) 64 except TypeError: [all …]
|
D | test_operator.py | 37 self.assertRaises(TypeError, operator.lt) 38 self.assertRaises(TypeError, operator.lt, 1j, 2j) 47 self.assertRaises(TypeError, operator.le) 48 self.assertRaises(TypeError, operator.le, 1j, 2j) 61 self.assertRaises(TypeError, operator.eq) 74 self.assertRaises(TypeError, operator.ne) 84 self.assertRaises(TypeError, operator.ge) 85 self.assertRaises(TypeError, operator.ge, 1j, 2j) 94 self.assertRaises(TypeError, operator.gt) 95 self.assertRaises(TypeError, operator.gt, 1j, 2j) [all …]
|
D | test_getargs2.py | 133 self.assertRaises(TypeError, getargs_b, 3.14) 149 self.assertRaises(TypeError, getargs_B, 3.14) 166 self.assertRaises(TypeError, getargs_H, 3.14) 183 self.assertRaises(TypeError, getargs_I, 3.14) 201 self.assertRaises(TypeError, getargs_k, 3.14) 202 self.assertRaises(TypeError, getargs_k, Long()) 203 self.assertRaises(TypeError, getargs_k, Int()) 219 self.assertRaises(TypeError, getargs_h, 3.14) 235 self.assertRaises(TypeError, getargs_i, 3.14) 251 self.assertRaises(TypeError, getargs_l, 3.14) [all …]
|
D | test_builtin.py | 73 self.assertRaises(TypeError, __import__, 1, 2, 3, 4) 75 self.assertRaises(TypeError, __import__, 'sys', name='sys') 92 self.assertRaises(TypeError, abs, 'a') 97 self.assertRaises(TypeError, abs) 98 self.assertRaises(TypeError, abs, None) 109 self.assertRaises(TypeError, all, 10) # Non-iterable 110 self.assertRaises(TypeError, all) # No args 111 self.assertRaises(TypeError, all, [2, 4, 6], []) # Too many args 124 self.assertRaises(TypeError, any, 10) # Non-iterable 125 self.assertRaises(TypeError, any) # No args [all …]
|
D | test_codeccallbacks.py | 104 raise TypeError("don't know how to handle %r" % exc) 135 raise TypeError("don't know how to handle %r" % exc) 182 raise TypeError("don't know how to handle %r" % exc) 219 self.assertRaises(TypeError, codecs.charmap_encode, sin, "replace", charmap) 222 self.assertRaises(TypeError, codecs.charmap_encode, sin, "replace", charmap) 233 raise TypeError("don't know how to handle %r" % exc) 257 raise TypeError("don't know how to handle %r" % exc) 265 raise TypeError("don't know how to handle %r" % exc) 329 self.assertRaises(TypeError, exctype, *args[:-1]) 331 self.assertRaises(TypeError, exctype, *(args + ["too much"])) [all …]
|
D | string_tests.py | 100 self.checkraises(TypeError, 'hello', 'capitalize', 42) 132 self.checkraises(TypeError, 'hello', 'count') 133 self.checkraises(TypeError, 'hello', 'count', 42) 178 self.checkraises(TypeError, 'hello', 'find') 179 self.checkraises(TypeError, 'hello', 'find', 42) 233 self.checkraises(TypeError, 'hello', 'rfind') 234 self.checkraises(TypeError, 'hello', 'rfind', 42) 281 self.checkraises(TypeError, 'hello', 'index') 282 self.checkraises(TypeError, 'hello', 'index', 42) 303 self.checkraises(TypeError, 'hello', 'rindex') [all …]
|
D | test_itertools.py | 69 self.assertRaises(TypeError, list,c(2, 3)) 76 self.assertRaises(TypeError, list, chain.from_iterable([2, 3])) 79 self.assertRaises(TypeError, combinations, 'abc') # missing r argument 80 self.assertRaises(TypeError, combinations, 'abc', 2, 1) # too many arguments 81 self.assertRaises(TypeError, combinations, None) # pool is not iterable 152 self.assertRaises(TypeError, cwr, 'abc') # missing r argument 153 self.assertRaises(TypeError, cwr, 'abc', 2, 1) # too many arguments 154 self.assertRaises(TypeError, cwr, None) # pool is not iterable 228 self.assertRaises(TypeError, permutations) # too few arguments 229 self.assertRaises(TypeError, permutations, 'abc', 2, 1) # too many arguments [all …]
|
/external/python/cpython3/Lib/test/ |
D | test_getargs2.py | 159 self.assertRaises(TypeError, getargs_b, 3.14) 162 self.assertRaises(TypeError, getargs_b, BadIndex()) 166 self.assertRaises(TypeError, getargs_b, Int()) 168 self.assertRaises(TypeError, getargs_b, BadInt()) 169 self.assertRaises(TypeError, getargs_b, BadInt2()) 183 self.assertRaises(TypeError, getargs_B, 3.14) 186 self.assertRaises(TypeError, getargs_B, BadIndex()) 190 self.assertRaises(TypeError, getargs_B, Int()) 192 self.assertRaises(TypeError, getargs_B, BadInt()) 193 self.assertRaises(TypeError, getargs_B, BadInt2()) [all …]
|
D | test_operator.py | 50 self.assertRaises(TypeError, operator.lt) 51 self.assertRaises(TypeError, operator.lt, 1j, 2j) 61 self.assertRaises(TypeError, operator.le) 62 self.assertRaises(TypeError, operator.le, 1j, 2j) 75 self.assertRaises(TypeError, operator.eq) 89 self.assertRaises(TypeError, operator.ne) 100 self.assertRaises(TypeError, operator.ge) 101 self.assertRaises(TypeError, operator.ge, 1j, 2j) 111 self.assertRaises(TypeError, operator.gt) 112 self.assertRaises(TypeError, operator.gt, 1j, 2j) [all …]
|
D | test_positional_only_arg.py | 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… 146 …with self.assertRaisesRegex(TypeError, r"f\(\) missing 3 required positional arguments: 'a', 'b', … [all …]
|
D | test_codeccallbacks.py | 89 raise TypeError("don't know how to handle %r" % exc) 120 raise TypeError("don't know how to handle %r" % exc) 175 raise TypeError("don't know how to handle %r" % exc) 212 self.assertRaises(TypeError, codecs.charmap_encode, sin, "replace", charmap) 222 raise TypeError("don't know how to handle %r" % exc) 229 raise TypeError("don't know how to handle %r" % exc) 293 self.assertRaises(TypeError, exctype, *args[:-1]) 295 self.assertRaises(TypeError, exctype, *(args + ["too much"])) 309 self.assertRaises(TypeError, exctype, *callargs) 389 TypeError, [all …]
|
D | test_call.py | 35 self.assertRaisesRegex(TypeError, msg, {}.__contains__) 39 self.assertRaisesRegex(TypeError, msg, {}.__contains__, 0, 1) 43 self.assertRaisesRegex(TypeError, msg, int.from_bytes, b'a', 'little', False) 47 self.assertRaisesRegex(TypeError, msg, {}.get) 50 self.assertRaisesRegex(TypeError, msg, {}.__delattr__) 54 self.assertRaisesRegex(TypeError, msg, getattr) 58 self.assertRaisesRegex(TypeError, msg, input, 1, 2) 62 self.assertRaisesRegex(TypeError, msg, {}.get, 1, 2, 3) 66 self.assertRaisesRegex(TypeError, msg, {}.__contains__, x=2) 70 self.assertRaisesRegex(TypeError, msg, {}.__contains__, x=2, y=2) [all …]
|
D | string_tests.py | 75 except TypeError: 126 self.checkraises(TypeError, 'hello', 'count') 131 self.checkraises(TypeError, 'hello', 'count', 42) 176 self.checkraises(TypeError, 'hello', 'find') 181 self.checkraises(TypeError, 'hello', 'find', 42) 234 self.checkraises(TypeError, 'hello', 'rfind') 239 self.checkraises(TypeError, 'hello', 'rfind', 42) 288 self.checkraises(TypeError, 'hello', 'index') 293 self.checkraises(TypeError, 'hello', 'index', 42) 314 self.checkraises(TypeError, 'hello', 'rindex') [all …]
|
D | test_raise.py | 50 raise TypeError("foo") 57 self.assertRaises(TypeError, reraise) 62 raise TypeError("foo") 75 raise TypeError("foo") 78 self.assertRaises(TypeError, reraise) 83 raise TypeError("foo") 87 self.assertIsInstance(e.__context__, TypeError) 93 raise TypeError("foo") 98 self.assertRaises(TypeError, reraise) 103 raise TypeError("foo") [all …]
|
D | test_builtin.py | 163 self.assertRaises(TypeError, __import__, 1, 2, 3, 4) 165 self.assertRaises(TypeError, __import__, 'sys', name='sys') 185 self.assertRaises(TypeError, abs, 'a') 190 self.assertRaises(TypeError, abs) 191 self.assertRaises(TypeError, abs, None) 202 self.assertRaises(TypeError, all, 10) # Non-iterable 203 self.assertRaises(TypeError, all) # No args 204 self.assertRaises(TypeError, all, [2, 4, 6], []) # Too many args 217 self.assertRaises(TypeError, any, 10) # Non-iterable 218 self.assertRaises(TypeError, any) # No args [all …]
|
/external/python/cpython2/Lib/ctypes/test/ |
D | test_parameters.py | 65 self.assertRaises(TypeError, c_char_p.from_param, 42) 78 self.assertRaises(TypeError, c_wchar_p.from_param, 42) 100 self.assertRaises(TypeError, LPINT.from_param, pointer(c_long(42))) 101 self.assertRaises(TypeError, LPINT.from_param, pointer(c_uint(42))) 102 self.assertRaises(TypeError, LPINT.from_param, pointer(c_short(42))) 112 self.assertRaises(TypeError, LPINT.from_param, byref(c_short(22))) 114 self.assertRaises(TypeError, LPINT.from_param, byref(c_long(22))) 115 self.assertRaises(TypeError, LPINT.from_param, byref(c_uint(22))) 124 self.assertRaises(TypeError, LPLPINT.from_param, byref(pointer(c_short(22)))) 126 self.assertRaises(TypeError, LPLPINT.from_param, byref(pointer(c_long(22)))) [all …]
|
D | test_frombuffer.py | 35 self.assertRaises(TypeError, 83 self.assertRaises(TypeError, Array.from_buffer, bytearray(10)) 84 self.assertRaises(TypeError, Structure.from_buffer, bytearray(10)) 85 self.assertRaises(TypeError, Union.from_buffer, bytearray(10)) 86 self.assertRaises(TypeError, _CFuncPtr.from_buffer, bytearray(10)) 87 self.assertRaises(TypeError, _Pointer.from_buffer, bytearray(10)) 88 self.assertRaises(TypeError, _SimpleCData.from_buffer, bytearray(10)) 90 self.assertRaises(TypeError, Array.from_buffer_copy, b"123") 91 self.assertRaises(TypeError, Structure.from_buffer_copy, b"123") 92 self.assertRaises(TypeError, Union.from_buffer_copy, b"123") [all …]
|
/external/python/cpython3/Lib/ctypes/test/ |
D | test_bytes.py | 9 self.assertRaises(TypeError, c_char, "x") 11 with self.assertRaises(TypeError): 14 self.assertRaises(TypeError, c_char.from_param, "x") 17 self.assertRaises(TypeError, c_char * 3, "a", "b", "c") 21 self.assertRaises(TypeError, c_wchar, b"x") 23 with self.assertRaises(TypeError): 26 self.assertRaises(TypeError, c_wchar.from_param, b"x") 28 self.assertRaises(TypeError, c_wchar * 3, b"a", b"b", b"c") 32 self.assertRaises(TypeError, c_char_p, "foo bar") 36 self.assertRaises(TypeError, c_wchar_p, b"foo bar") [all …]
|
D | test_frombuffer.py | 41 with self.assertRaisesRegex(TypeError, "not writable"): 43 with self.assertRaisesRegex(TypeError, "not writable"): 45 with self.assertRaisesRegex(TypeError, "not C contiguous"): 48 with self.assertRaisesRegex(TypeError, msg): 59 with self.assertRaisesRegex(TypeError, "not C contiguous"): 64 with self.assertRaisesRegex(TypeError, "not C contiguous"): 108 with self.assertRaises(TypeError): 126 self.assertRaises(TypeError, Array.from_buffer, bytearray(10)) 127 self.assertRaises(TypeError, Structure.from_buffer, bytearray(10)) 128 self.assertRaises(TypeError, Union.from_buffer, bytearray(10)) [all …]
|
D | test_parameters.py | 62 self.assertRaises(TypeError, c_char_p.from_param, "123\377") 63 self.assertRaises(TypeError, c_char_p.from_param, 42) 76 self.assertRaises(TypeError, c_wchar_p.from_param, 42) 77 self.assertRaises(TypeError, c_wchar_p.from_param, b"123\377") 95 self.assertRaises(TypeError, LPINT.from_param, pointer(c_long(42))) 96 self.assertRaises(TypeError, LPINT.from_param, pointer(c_uint(42))) 97 self.assertRaises(TypeError, LPINT.from_param, pointer(c_short(42))) 107 self.assertRaises(TypeError, LPINT.from_param, byref(c_short(22))) 109 self.assertRaises(TypeError, LPINT.from_param, byref(c_long(22))) 110 self.assertRaises(TypeError, LPINT.from_param, byref(c_uint(22))) [all …]
|
/external/tensorflow/tensorflow/python/framework/ |
D | extension_type_field.py | 107 except TypeError as e: 108 raise TypeError(f'In field {name!r}: {e}') from e 142 raise TypeError(f'Unresolved forward reference {value_type!r}') 151 raise TypeError(f"Mapping had a key '{value_type.__name__}' with type " 169 raise TypeError(f'Unsupported type annotation `{value_type.__name__}`') 171 raise TypeError(f'Unsupported type annotation {value_type!r}') 288 except TypeError as e: 289 raise TypeError( 294 except TypeError as e: 295 raise TypeError( [all …]
|
D | op_def_library.py | 40 raise TypeError(f"Inconsistent OpDef for '{op_def.name}', missing attr " 47 raise TypeError(f"Inconsistent OpDef for '{op_type_name}', missing attr " 56 raise TypeError( 162 raise TypeError(f"Expected float for argument '{arg_name}' not {repr(v)}.") 168 raise TypeError(f"Expected int for argument '{arg_name}' not {repr(v)}.") 171 except (ValueError, TypeError): 172 raise TypeError(f"Expected int for argument '{arg_name}' not {repr(v)}.") 177 raise TypeError(f"Expected string for argument '{arg_name}' not {repr(v)}.") 183 raise TypeError(f"Expected bool for argument '{arg_name}' not {repr(v)}.") 190 except TypeError: [all …]
|
/external/python/typing/typing_extensions/src/ |
D | test_typing_extensions.py | 67 with self.assertRaises(TypeError): 71 with self.assertRaises(TypeError): 73 with self.assertRaises(TypeError): 77 with self.assertRaises(TypeError): 81 with self.assertRaises(TypeError): 84 with self.assertRaises(TypeError): 89 with self.assertRaises(TypeError): 91 with self.assertRaises(TypeError): 157 with self.assertRaises(TypeError): 159 with self.assertRaises(TypeError): [all …]
|
/external/python/rsa/tests/ |
D | test_common.py | 51 self.assertRaises(TypeError, byte_size, []) 52 self.assertRaises(TypeError, byte_size, ()) 53 self.assertRaises(TypeError, byte_size, dict()) 54 self.assertRaises(TypeError, byte_size, "") 55 self.assertRaises(TypeError, byte_size, None) 79 self.assertRaises(TypeError, bit_size, []) 80 self.assertRaises(TypeError, bit_size, ()) 81 self.assertRaises(TypeError, bit_size, dict()) 82 self.assertRaises(TypeError, bit_size, "") 83 self.assertRaises(TypeError, bit_size, None) [all …]
|
/external/python/cpython2/Lib/plat-mac/lib-scriptpackages/Netscape/ |
D | Mozilla_suite.py | 23 if _arguments: raise TypeError, 'No optional args expected' 24 if _no_object is not None: raise TypeError, 'No direct arg expected' 43 if _arguments: raise TypeError, 'No optional args expected' 44 if _no_object is not None: raise TypeError, 'No direct arg expected' 63 if _arguments: raise TypeError, 'No optional args expected' 64 if _no_object is not None: raise TypeError, 'No direct arg expected' 109 if _arguments: raise TypeError, 'No optional args expected' 128 if _arguments: raise TypeError, 'No optional args expected' 129 if _no_object is not None: raise TypeError, 'No direct arg expected' 148 if _arguments: raise TypeError, 'No optional args expected' [all …]
|