/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 …]
|
/external/python/cpython3/Lib/test/ |
D | test_getargs2.py | 157 self.assertRaises(TypeError, getargs_b, 3.14) 160 self.assertRaises(TypeError, getargs_b, BadIndex()) 167 self.assertRaises(TypeError, getargs_b, BadInt()) 183 self.assertRaises(TypeError, getargs_B, 3.14) 186 self.assertRaises(TypeError, getargs_B, BadIndex()) 193 self.assertRaises(TypeError, getargs_B, BadInt()) 209 self.assertRaises(TypeError, getargs_H, 3.14) 212 self.assertRaises(TypeError, getargs_H, BadIndex()) 219 self.assertRaises(TypeError, getargs_H, BadInt()) 236 self.assertRaises(TypeError, getargs_I, 3.14) [all …]
|
D | test_call.py | 38 self.assertRaises(TypeError, {}.__contains__) 44 self.assertRaises(TypeError, {}.__contains__, 0, 1) 49 except TypeError: 58 except TypeError: 64 self.assertRaises(TypeError, {}.__contains__, x=2) 67 self.assertRaises(TypeError, {}.__contains__, x=2, y=2) 73 self.assertRaises(TypeError, {}.keys, 0) 76 self.assertRaises(TypeError, {}.keys, 0, 1) 84 except TypeError: 92 except TypeError: [all …]
|
D | test_operator.py | 42 self.assertRaises(TypeError, operator.lt) 43 self.assertRaises(TypeError, operator.lt, 1j, 2j) 53 self.assertRaises(TypeError, operator.le) 54 self.assertRaises(TypeError, operator.le, 1j, 2j) 67 self.assertRaises(TypeError, operator.eq) 81 self.assertRaises(TypeError, operator.ne) 92 self.assertRaises(TypeError, operator.ge) 93 self.assertRaises(TypeError, operator.ge, 1j, 2j) 103 self.assertRaises(TypeError, operator.gt) 104 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_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 | string_tests.py | 74 except TypeError: 125 self.checkraises(TypeError, 'hello', 'count') 130 self.checkraises(TypeError, 'hello', 'count', 42) 175 self.checkraises(TypeError, 'hello', 'find') 180 self.checkraises(TypeError, 'hello', 'find', 42) 233 self.checkraises(TypeError, 'hello', 'rfind') 238 self.checkraises(TypeError, 'hello', 'rfind', 42) 287 self.checkraises(TypeError, 'hello', 'index') 292 self.checkraises(TypeError, 'hello', 'index', 42) 313 self.checkraises(TypeError, 'hello', 'rindex') [all …]
|
D | test_builtin.py | 161 self.assertRaises(TypeError, __import__, 1, 2, 3, 4) 163 self.assertRaises(TypeError, __import__, 'sys', name='sys') 183 self.assertRaises(TypeError, abs, 'a') 188 self.assertRaises(TypeError, abs) 189 self.assertRaises(TypeError, abs, None) 200 self.assertRaises(TypeError, all, 10) # Non-iterable 201 self.assertRaises(TypeError, all) # No args 202 self.assertRaises(TypeError, all, [2, 4, 6], []) # Too many args 215 self.assertRaises(TypeError, any, 10) # Non-iterable 216 self.assertRaises(TypeError, any) # No args [all …]
|
D | test_typing.py | 73 with self.assertRaises(TypeError): 77 with self.assertRaises(TypeError): 79 with self.assertRaises(TypeError): 86 with self.assertRaises(TypeError): 88 with self.assertRaises(TypeError): 92 with self.assertRaises(TypeError): 95 with self.assertRaises(TypeError): 100 with self.assertRaises(TypeError): 102 with self.assertRaises(TypeError): 115 with self.assertRaises(TypeError): [all …]
|
D | test_unicodedata.py | 113 self.assertRaises(TypeError, self.db.digit) 114 self.assertRaises(TypeError, self.db.digit, 'xx') 126 self.assertRaises(TypeError, self.db.numeric) 127 self.assertRaises(TypeError, self.db.numeric, 'xx') 138 self.assertRaises(TypeError, self.db.decimal) 139 self.assertRaises(TypeError, self.db.decimal, 'xx') 149 self.assertRaises(TypeError, self.db.category) 150 self.assertRaises(TypeError, self.db.category, 'xx') 158 self.assertRaises(TypeError, self.db.bidirectional) 159 self.assertRaises(TypeError, self.db.bidirectional, 'xx') [all …]
|
/external/python/cpython3/Lib/ctypes/test/ |
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 …]
|
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 …]
|
/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/rsa/tests/ |
D | test_common.py | 53 self.assertRaises(TypeError, byte_size, []) 54 self.assertRaises(TypeError, byte_size, ()) 55 self.assertRaises(TypeError, byte_size, dict()) 56 self.assertRaises(TypeError, byte_size, "") 57 self.assertRaises(TypeError, byte_size, None) 81 self.assertRaises(TypeError, bit_size, []) 82 self.assertRaises(TypeError, bit_size, ()) 83 self.assertRaises(TypeError, bit_size, dict()) 84 self.assertRaises(TypeError, bit_size, "") 85 self.assertRaises(TypeError, bit_size, None) [all …]
|
/external/tensorflow/tensorflow/python/framework/ |
D | op_def_library.py | 42 raise TypeError("Inconsistent OpDef for '%s', missing attr '%s'" % 49 raise TypeError("Inconsistent OpDef, missing attr '%s' from '%s'." % 57 raise TypeError( 143 raise TypeError("Expected float for argument '%s' not %s." % 150 raise TypeError("Expected int for argument '%s' not %s." % 154 except (ValueError, TypeError): 155 raise TypeError("Expected int for argument '%s' not %s." % 161 raise TypeError("Expected string for argument '%s' not %s." % 168 raise TypeError("Expected bool for argument '%s' not %s." % 176 except TypeError: [all …]
|
/external/python/cpython3/Lib/idlelib/idle_test/ |
D | test_run.py | 112 self.assertRaises(TypeError, f.read, 1.5) 113 self.assertRaises(TypeError, f.read, '1') 114 self.assertRaises(TypeError, f.read, 1, 1) 137 self.assertRaises(TypeError, f.readlines, 1.5) 138 self.assertRaises(TypeError, f.readlines, '1') 139 self.assertRaises(TypeError, f.readlines, 1, 1) 158 self.assertRaises(TypeError, f.readlines, 1.5) 159 self.assertRaises(TypeError, f.readlines, '1') 160 self.assertRaises(TypeError, f.readlines, 1, 1) 171 self.assertRaises(TypeError, f.close, 1) [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 …]
|