• Home
  • Raw
  • Download

Lines Matching refs:assertRaises

133         self.assertRaises(TypeError, getargs_b, 3.14)
137 self.assertRaises(OverflowError, getargs_b, -1)
140 self.assertRaises(OverflowError, getargs_b, UCHAR_MAX + 1)
144 self.assertRaises(OverflowError, getargs_b, VERY_LARGE)
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)
223 self.assertRaises(OverflowError, getargs_h, SHRT_MIN-1)
226 self.assertRaises(OverflowError, getargs_h, SHRT_MAX+1)
230 self.assertRaises(OverflowError, getargs_h, VERY_LARGE)
235 self.assertRaises(TypeError, getargs_i, 3.14)
239 self.assertRaises(OverflowError, getargs_i, INT_MIN-1)
242 self.assertRaises(OverflowError, getargs_i, INT_MAX+1)
246 self.assertRaises(OverflowError, getargs_i, VERY_LARGE)
251 self.assertRaises(TypeError, getargs_l, 3.14)
255 self.assertRaises(OverflowError, getargs_l, LONG_MIN-1)
258 self.assertRaises(OverflowError, getargs_l, LONG_MAX+1)
262 self.assertRaises(OverflowError, getargs_l, VERY_LARGE)
268 self.assertRaises(TypeError, getargs_n, 3.14)
272 self.assertRaises(OverflowError, getargs_n, PY_SSIZE_T_MIN-1)
275 self.assertRaises(OverflowError, getargs_n, PY_SSIZE_T_MAX+1)
279 self.assertRaises(OverflowError, getargs_n, VERY_LARGE)
301 self.assertRaises(DeprecationWarning, getargs_L, 3.14)
303 self.assertRaises(TypeError, getargs_L, "Hello")
307 self.assertRaises(OverflowError, getargs_L, LLONG_MIN-1)
310 self.assertRaises(OverflowError, getargs_L, LLONG_MAX+1)
314 self.assertRaises(OverflowError, getargs_L, VERY_LARGE)
319 self.assertRaises(TypeError, getargs_K, 3.14)
320 self.assertRaises(TypeError, getargs_K, Long())
321 self.assertRaises(TypeError, getargs_K, Int())
341 self.assertRaises(TypeError, getargs_f, 4.25+0j)
345 self.assertRaises(TypeError, getargs_f, BadFloat())
366 self.assertRaises(TypeError, getargs_d, 4.25+0j)
370 self.assertRaises(TypeError, getargs_d, BadFloat())
376 self.assertRaises(OverflowError, getargs_d, 1<<DBL_MAX_EXP)
377 self.assertRaises(OverflowError, getargs_d, -1<<DBL_MAX_EXP)
391 self.assertRaises(TypeError, getargs_D, BadComplex())
446 self.assertRaises(TypeError, getargs_tuple, 1, seq())
524 self.assertRaises(TypeError, getargs_c, 'abc') # len > 1
527 self.assertRaises(TypeError, getargs_c, u's')
528 self.assertRaises(TypeError, getargs_c, bytearray('a'))
529 self.assertRaises(TypeError, getargs_c, memoryview('a'))
531 self.assertRaises(TypeError, getargs_c, buffer('a'))
532 self.assertRaises(TypeError, getargs_c, 97)
533 self.assertRaises(TypeError, getargs_c, None)
537 self.assertRaises(TypeError, getargs_w, 'abc', 3)
538 self.assertRaises(TypeError, getargs_w, u'abc', 3)
539 self.assertRaises(TypeError, getargs_w, bytearray('bytes'), 3)
540 self.assertRaises(TypeError, getargs_w, memoryview('bytes'), 3)
541 self.assertRaises(TypeError, getargs_w,
544 self.assertRaises(TypeError, getargs_w, buffer('bytes'), 3)
545 self.assertRaises(TypeError, getargs_w,
547 self.assertRaises(TypeError, getargs_w, None, 0)
551 self.assertRaises(TypeError, getargs_w_hash, 'abc')
552 self.assertRaises(TypeError, getargs_w_hash, u'abc')
553 self.assertRaises(TypeError, getargs_w_hash, bytearray('bytes'))
554 self.assertRaises(TypeError, getargs_w_hash, memoryview('bytes'))
555 self.assertRaises(TypeError, getargs_w_hash,
558 self.assertRaises(TypeError, getargs_w_hash, buffer('bytes'))
559 self.assertRaises(TypeError, getargs_w_hash,
561 self.assertRaises(TypeError, getargs_w_hash, None)
566 self.assertRaises(TypeError, getargs_w_star, 'abc')
567 self.assertRaises(TypeError, getargs_w_star, u'abc')
568 self.assertRaises(TypeError, getargs_w_star, memoryview('bytes'))
576 self.assertRaises(TypeError, getargs_w_star, buffer('buffer'))
577 self.assertRaises(TypeError, getargs_w_star,
579 self.assertRaises(TypeError, getargs_w_star, None)
587 self.assertRaises(TypeError, getargs_s, 'nul:\0')
588 self.assertRaises(TypeError, getargs_s, u'nul:\0')
589 self.assertRaises(TypeError, getargs_s, bytearray('bytearray'))
590 self.assertRaises(TypeError, getargs_s, memoryview('memoryview'))
592 self.assertRaises(TypeError, getargs_s, buffer('buffer'))
593 self.assertRaises(TypeError, getargs_s, None)
607 self.assertRaises(TypeError, getargs_s_star, None)
615 self.assertRaises(TypeError, getargs_s_hash, bytearray('bytearray'))
616 self.assertRaises(TypeError, getargs_s_hash, memoryview('memoryview'))
621 self.assertRaises(TypeError, getargs_s_hash, None)
629 self.assertRaises(TypeError, getargs_t_hash, bytearray('bytearray'))
630 self.assertRaises(TypeError, getargs_t_hash, memoryview('memoryview'))
634 self.assertRaises(TypeError, getargs_t_hash, None)
640 self.assertRaises(TypeError, getargs_z, 'nul:\0')
641 self.assertRaises(TypeError, getargs_z, u'nul:\0')
642 self.assertRaises(TypeError, getargs_z, bytearray('bytearray'))
643 self.assertRaises(TypeError, getargs_z, memoryview('memoryview'))
645 self.assertRaises(TypeError, getargs_z, buffer('buffer'))
668 self.assertRaises(TypeError, getargs_z_hash, bytearray('bytearray'))
669 self.assertRaises(TypeError, getargs_z_hash, memoryview('memoryview'))
685 self.assertRaises(UnicodeEncodeError, getargs_es, u'abc\xe9', 'ascii')
686 self.assertRaises(LookupError, getargs_es, u'abc', 'spam')
687 self.assertRaises(TypeError, getargs_es,
689 self.assertRaises(TypeError, getargs_es,
694 self.assertRaises(TypeError, getargs_es, None, 'latin1')
695 self.assertRaises(TypeError, getargs_es, 'nul:\0', 'latin1')
696 self.assertRaises(TypeError, getargs_es, u'nul:\0', 'latin1')
705 self.assertRaises(UnicodeEncodeError, getargs_et, u'abc\xe9', 'ascii')
706 self.assertRaises(LookupError, getargs_et, u'abc', 'spam')
707 self.assertRaises(TypeError, getargs_et,
709 self.assertRaises(TypeError, getargs_et,
714 self.assertRaises(TypeError, getargs_et, None, 'latin1')
715 self.assertRaises(TypeError, getargs_et, 'nul:\0', 'latin1')
716 self.assertRaises(TypeError, getargs_et, u'nul:\0', 'latin1')
723 self.assertRaises(UnicodeEncodeError, getargs_es_hash, u'abc\xe9', 'ascii')
724 self.assertRaises(LookupError, getargs_es_hash, u'abc', 'spam')
725 self.assertRaises(TypeError, getargs_es_hash,
727 self.assertRaises(TypeError, getargs_es_hash,
732 self.assertRaises(TypeError, getargs_es_hash, None, 'latin1')
743 self.assertRaises(TypeError, getargs_es_hash, u'abc\xe9', 'latin1', buf)
746 self.assertRaises(TypeError, getargs_es_hash, u'abc\xe9', 'latin1', buf)
754 self.assertRaises(UnicodeEncodeError, getargs_et_hash,
756 self.assertRaises(LookupError, getargs_et_hash, u'abc', 'spam')
757 self.assertRaises(TypeError, getargs_et_hash,
759 self.assertRaises(TypeError, getargs_et_hash,
764 self.assertRaises(TypeError, getargs_et_hash, None, 'latin1')
775 self.assertRaises(TypeError, getargs_et_hash, u'abc\xe9', 'latin1', buf)
778 self.assertRaises(TypeError, getargs_et_hash, u'abc\xe9', 'latin1', buf)
783 self.assertRaises(TypeError, getargs_u, u'nul:\0')
784 self.assertRaises(TypeError, getargs_u, 'bytes')
785 self.assertRaises(TypeError, getargs_u, bytearray('bytearray'))
786 self.assertRaises(TypeError, getargs_u, memoryview('memoryview'))
788 self.assertRaises(TypeError, getargs_u, buffer('buffer'))
789 self.assertRaises(TypeError, getargs_u, None)
795 self.assertRaises(TypeError, getargs_u_hash, 'bytes')
796 self.assertRaises(TypeError, getargs_u_hash, bytearray('bytearray'))
797 self.assertRaises(TypeError, getargs_u_hash, memoryview('memoryview'))
799 self.assertRaises(TypeError, getargs_u_hash, buffer('buffer'))
800 self.assertRaises(TypeError, getargs_u_hash, None)
808 self.assertRaises(TypeError, getargs_S, bytearray('bytearray'))
810 self.assertRaises(TypeError, getargs_S, u'unicode')
811 self.assertRaises(TypeError, getargs_S, None)
812 self.assertRaises(TypeError, getargs_S, memoryview(obj))
813 self.assertRaises(TypeError, getargs_S, buffer(obj))
819 self.assertRaises(TypeError, getargs_Y, 'str')
821 self.assertRaises(TypeError, getargs_Y, u'unicode')
822 self.assertRaises(TypeError, getargs_Y, None)
823 self.assertRaises(TypeError, getargs_Y, memoryview(obj))
824 self.assertRaises(TypeError, getargs_Y, buffer(obj))
831 self.assertRaises(TypeError, getargs_U, 'str')
832 self.assertRaises(TypeError, getargs_U, bytearray('bytearray'))
833 self.assertRaises(TypeError, getargs_U, None)
834 self.assertRaises(TypeError, getargs_U, memoryview(obj))
835 self.assertRaises(TypeError, getargs_U, buffer(obj))
942 self.assertRaises(TypeError, _testcapi.parse_tuple_and_keywords,
944 self.assertRaises(ValueError, _testcapi.parse_tuple_and_keywords,
946 self.assertRaises(ValueError, _testcapi.parse_tuple_and_keywords,
948 self.assertRaises(TypeError, _testcapi.parse_tuple_and_keywords,
954 self.assertRaises(TypeError, _testcapi.parse_tuple_and_keywords,
956 self.assertRaises(RuntimeError, _testcapi.parse_tuple_and_keywords,
958 self.assertRaises(RuntimeError, _testcapi.parse_tuple_and_keywords,