• Home
  • Raw
  • Download

Lines Matching refs:assertRaises

157         self.assertRaises(TypeError, getargs_b, 3.14)
160 self.assertRaises(TypeError, getargs_b, BadIndex())
167 self.assertRaises(TypeError, getargs_b, BadInt())
172 self.assertRaises(OverflowError, getargs_b, -1)
175 self.assertRaises(OverflowError, getargs_b, UCHAR_MAX + 1)
178 self.assertRaises(OverflowError, getargs_b, VERY_LARGE)
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)
239 self.assertRaises(TypeError, getargs_I, BadIndex())
246 self.assertRaises(TypeError, getargs_I, BadInt())
264 self.assertRaises(TypeError, getargs_k, 3.14)
265 self.assertRaises(TypeError, getargs_k, Index())
267 self.assertRaises(TypeError, getargs_k, BadIndex())
268 self.assertRaises(TypeError, getargs_k, BadIndex2())
270 self.assertRaises(TypeError, getargs_k, Int())
272 self.assertRaises(TypeError, getargs_k, BadInt())
273 self.assertRaises(TypeError, getargs_k, BadInt2())
289 self.assertRaises(TypeError, getargs_h, 3.14)
292 self.assertRaises(TypeError, getargs_h, BadIndex())
299 self.assertRaises(TypeError, getargs_h, BadInt())
304 self.assertRaises(OverflowError, getargs_h, SHRT_MIN-1)
307 self.assertRaises(OverflowError, getargs_h, SHRT_MAX+1)
310 self.assertRaises(OverflowError, getargs_h, VERY_LARGE)
315 self.assertRaises(TypeError, getargs_i, 3.14)
318 self.assertRaises(TypeError, getargs_i, BadIndex())
325 self.assertRaises(TypeError, getargs_i, BadInt())
330 self.assertRaises(OverflowError, getargs_i, INT_MIN-1)
333 self.assertRaises(OverflowError, getargs_i, INT_MAX+1)
336 self.assertRaises(OverflowError, getargs_i, VERY_LARGE)
341 self.assertRaises(TypeError, getargs_l, 3.14)
344 self.assertRaises(TypeError, getargs_l, BadIndex())
351 self.assertRaises(TypeError, getargs_l, BadInt())
356 self.assertRaises(OverflowError, getargs_l, LONG_MIN-1)
359 self.assertRaises(OverflowError, getargs_l, LONG_MAX+1)
362 self.assertRaises(OverflowError, getargs_l, VERY_LARGE)
368 self.assertRaises(TypeError, getargs_n, 3.14)
371 self.assertRaises(TypeError, getargs_n, BadIndex())
375 self.assertRaises(TypeError, getargs_n, Int())
377 self.assertRaises(TypeError, getargs_n, BadInt())
378 self.assertRaises(TypeError, getargs_n, BadInt2())
381 self.assertRaises(OverflowError, getargs_n, PY_SSIZE_T_MIN-1)
384 self.assertRaises(OverflowError, getargs_n, PY_SSIZE_T_MAX+1)
387 self.assertRaises(OverflowError, getargs_n, VERY_LARGE)
395 self.assertRaises(TypeError, getargs_L, 3.14)
396 self.assertRaises(TypeError, getargs_L, "Hello")
399 self.assertRaises(TypeError, getargs_L, BadIndex())
406 self.assertRaises(TypeError, getargs_L, BadInt())
411 self.assertRaises(OverflowError, getargs_L, LLONG_MIN-1)
414 self.assertRaises(OverflowError, getargs_L, LLONG_MAX+1)
417 self.assertRaises(OverflowError, getargs_L, VERY_LARGE)
422 self.assertRaises(TypeError, getargs_K, 3.14)
423 self.assertRaises(TypeError, getargs_K, Index())
425 self.assertRaises(TypeError, getargs_K, BadIndex())
426 self.assertRaises(TypeError, getargs_K, BadIndex2())
428 self.assertRaises(TypeError, getargs_K, Int())
430 self.assertRaises(TypeError, getargs_K, BadInt())
431 self.assertRaises(TypeError, getargs_K, BadInt2())
452 self.assertRaises(TypeError, getargs_f, 4.25+0j)
456 self.assertRaises(TypeError, getargs_f, BadFloat())
461 self.assertRaises(TypeError, getargs_f, Int())
486 self.assertRaises(TypeError, getargs_d, 4.25+0j)
490 self.assertRaises(TypeError, getargs_d, BadFloat())
495 self.assertRaises(TypeError, getargs_d, Int())
499 self.assertRaises(OverflowError, getargs_d, 1<<DBL_MAX_EXP)
500 self.assertRaises(OverflowError, getargs_d, -1<<DBL_MAX_EXP)
514 self.assertRaises(TypeError, getargs_D, BadComplex())
519 self.assertRaises(TypeError, getargs_D, Int())
560 self.assertRaises(NotImplementedError, getargs_p, Paradox())
603 self.assertRaises(TypeError, getargs_tuple, 1, seq())
800 self.assertRaises(TypeError, getargs_c, b'abc') # len > 1
803 self.assertRaises(TypeError, getargs_c, memoryview(b'a'))
804 self.assertRaises(TypeError, getargs_c, 's')
805 self.assertRaises(TypeError, getargs_c, 97)
806 self.assertRaises(TypeError, getargs_c, None)
810 self.assertRaises(TypeError, getargs_y, 'abc\xe9')
812 self.assertRaises(ValueError, getargs_y, b'nul:\0')
813 self.assertRaises(TypeError, getargs_y, bytearray(b'bytearray'))
814 self.assertRaises(TypeError, getargs_y, memoryview(b'memoryview'))
815 self.assertRaises(TypeError, getargs_y, None)
819 self.assertRaises(TypeError, getargs_y_star, 'abc\xe9')
824 self.assertRaises(TypeError, getargs_y_star, None)
828 self.assertRaises(TypeError, getargs_y_hash, 'abc\xe9')
831 self.assertRaises(TypeError, getargs_y_hash, bytearray(b'bytearray'))
832 self.assertRaises(TypeError, getargs_y_hash, memoryview(b'memoryview'))
833 self.assertRaises(TypeError, getargs_y_hash, None)
838 self.assertRaises(TypeError, getargs_w_star, 'abc\xe9')
839 self.assertRaises(TypeError, getargs_w_star, b'bytes')
840 self.assertRaises(TypeError, getargs_w_star, b'nul:\0')
841 self.assertRaises(TypeError, getargs_w_star, memoryview(b'bytes'))
848 self.assertRaises(TypeError, getargs_w_star, None)
854 self.assertRaises(TypeError, getargs_C, 'abc') # len > 1
858 self.assertRaises(TypeError, getargs_C, b'a')
859 self.assertRaises(TypeError, getargs_C, bytearray(b'a'))
860 self.assertRaises(TypeError, getargs_C, memoryview(b'a'))
861 self.assertRaises(TypeError, getargs_C, 97)
862 self.assertRaises(TypeError, getargs_C, None)
867 self.assertRaises(ValueError, getargs_s, 'nul:\0')
868 self.assertRaises(TypeError, getargs_s, b'bytes')
869 self.assertRaises(TypeError, getargs_s, bytearray(b'bytearray'))
870 self.assertRaises(TypeError, getargs_s, memoryview(b'memoryview'))
871 self.assertRaises(TypeError, getargs_s, None)
880 self.assertRaises(TypeError, getargs_s_star, None)
887 self.assertRaises(TypeError, getargs_s_hash, bytearray(b'bytearray'))
888 self.assertRaises(TypeError, getargs_s_hash, memoryview(b'memoryview'))
889 self.assertRaises(TypeError, getargs_s_hash, None)
894 self.assertRaises(ValueError, getargs_z, 'nul:\0')
895 self.assertRaises(TypeError, getargs_z, b'bytes')
896 self.assertRaises(TypeError, getargs_z, bytearray(b'bytearray'))
897 self.assertRaises(TypeError, getargs_z, memoryview(b'memoryview'))
914 self.assertRaises(TypeError, getargs_z_hash, bytearray(b'bytearray'))
915 self.assertRaises(TypeError, getargs_z_hash, memoryview(b'memoryview'))
922 self.assertRaises(UnicodeEncodeError, getargs_es, 'abc\xe9', 'ascii')
923 self.assertRaises(LookupError, getargs_es, 'abc\xe9', 'spam')
924 self.assertRaises(TypeError, getargs_es, b'bytes', 'latin1')
925 self.assertRaises(TypeError, getargs_es, bytearray(b'bytearray'), 'latin1')
926 self.assertRaises(TypeError, getargs_es, memoryview(b'memoryview'), 'latin1')
927 self.assertRaises(TypeError, getargs_es, None, 'latin1')
928 self.assertRaises(TypeError, getargs_es, 'nul:\0', 'latin1')
934 self.assertRaises(UnicodeEncodeError, getargs_et, 'abc\xe9', 'ascii')
935 self.assertRaises(LookupError, getargs_et, 'abc\xe9', 'spam')
938 self.assertRaises(TypeError, getargs_et, memoryview(b'memoryview'), 'latin1')
939 self.assertRaises(TypeError, getargs_et, None, 'latin1')
940 self.assertRaises(TypeError, getargs_et, 'nul:\0', 'latin1')
941 self.assertRaises(TypeError, getargs_et, b'nul:\0', 'latin1')
942 self.assertRaises(TypeError, getargs_et, bytearray(b'nul:\0'), 'latin1')
948 self.assertRaises(UnicodeEncodeError, getargs_es_hash, 'abc\xe9', 'ascii')
949 self.assertRaises(LookupError, getargs_es_hash, 'abc\xe9', 'spam')
950 self.assertRaises(TypeError, getargs_es_hash, b'bytes', 'latin1')
951 self.assertRaises(TypeError, getargs_es_hash, bytearray(b'bytearray'), 'latin1')
952 self.assertRaises(TypeError, getargs_es_hash, memoryview(b'memoryview'), 'latin1')
953 self.assertRaises(TypeError, getargs_es_hash, None, 'latin1')
963 self.assertRaises(ValueError, getargs_es_hash, 'abc\xe9', 'latin1', buf)
966 self.assertRaises(ValueError, getargs_es_hash, 'abc\xe9', 'latin1', buf)
972 self.assertRaises(UnicodeEncodeError, getargs_et_hash, 'abc\xe9', 'ascii')
973 self.assertRaises(LookupError, getargs_et_hash, 'abc\xe9', 'spam')
976 self.assertRaises(TypeError, getargs_et_hash, memoryview(b'memoryview'), 'latin1')
977 self.assertRaises(TypeError, getargs_et_hash, None, 'latin1')
989 self.assertRaises(ValueError, getargs_et_hash, 'abc\xe9', 'latin1', buf)
992 self.assertRaises(ValueError, getargs_et_hash, 'abc\xe9', 'latin1', buf)
997 self.assertRaises(ValueError, getargs_u, 'nul:\0')
998 self.assertRaises(TypeError, getargs_u, b'bytes')
999 self.assertRaises(TypeError, getargs_u, bytearray(b'bytearray'))
1000 self.assertRaises(TypeError, getargs_u, memoryview(b'memoryview'))
1001 self.assertRaises(TypeError, getargs_u, None)
1007 self.assertRaises(TypeError, getargs_u_hash, b'bytes')
1008 self.assertRaises(TypeError, getargs_u_hash, bytearray(b'bytearray'))
1009 self.assertRaises(TypeError, getargs_u_hash, memoryview(b'memoryview'))
1010 self.assertRaises(TypeError, getargs_u_hash, None)
1015 self.assertRaises(ValueError, getargs_Z, 'nul:\0')
1016 self.assertRaises(TypeError, getargs_Z, b'bytes')
1017 self.assertRaises(TypeError, getargs_Z, bytearray(b'bytearray'))
1018 self.assertRaises(TypeError, getargs_Z, memoryview(b'memoryview'))
1025 self.assertRaises(TypeError, getargs_Z_hash, b'bytes')
1026 self.assertRaises(TypeError, getargs_Z_hash, bytearray(b'bytearray'))
1027 self.assertRaises(TypeError, getargs_Z_hash, memoryview(b'memoryview'))
1036 self.assertRaises(TypeError, getargs_S, bytearray(b'bytearray'))
1037 self.assertRaises(TypeError, getargs_S, 'str')
1038 self.assertRaises(TypeError, getargs_S, None)
1039 self.assertRaises(TypeError, getargs_S, memoryview(obj))
1045 self.assertRaises(TypeError, getargs_Y, b'bytes')
1046 self.assertRaises(TypeError, getargs_Y, 'str')
1047 self.assertRaises(TypeError, getargs_Y, None)
1048 self.assertRaises(TypeError, getargs_Y, memoryview(obj))
1054 self.assertRaises(TypeError, getargs_U, b'bytes')
1055 self.assertRaises(TypeError, getargs_U, bytearray(b'bytearray'))
1056 self.assertRaises(TypeError, getargs_U, None)
1171 self.assertRaises(TypeError, _testcapi.parse_tuple_and_keywords,
1173 self.assertRaises(ValueError, _testcapi.parse_tuple_and_keywords,
1175 self.assertRaises(ValueError, _testcapi.parse_tuple_and_keywords,
1177 self.assertRaises(ValueError, _testcapi.parse_tuple_and_keywords,
1183 self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
1185 self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
1187 self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
1189 self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
1191 self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
1193 self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
1195 self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
1197 self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
1199 self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
1201 self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,