Lines Matching refs:assertRaises
190 self.assertRaises(UnicodeDecodeError, sin.decode,
204 self.assertRaises(UnicodeError, codecs.charmap_encode, sin, "strict", charmap)
212 self.assertRaises(TypeError, codecs.charmap_encode, sin, "replace", charmap)
293 self.assertRaises(TypeError, exctype, *args[:-1])
295 self.assertRaises(TypeError, exctype, *(args + ["too much"]))
309 self.assertRaises(TypeError, exctype, *callargs)
388 self.assertRaises(
394 self.assertRaises(
401 self.assertRaises(
406 self.assertRaises(
411 self.assertRaises(
419 self.assertRaises(
425 self.assertRaises(
449 self.assertRaises(
455 self.assertRaises(
460 self.assertRaises(
465 self.assertRaises(
489 self.assertRaises(
495 self.assertRaises(
501 self.assertRaises(
506 self.assertRaises(
526 self.assertRaises(
532 self.assertRaises(
584 self.assertRaises(
590 self.assertRaises(
596 self.assertRaises(
601 self.assertRaises(
631 self.assertRaises(
637 self.assertRaises(
643 self.assertRaises(
651 self.assertRaises(
661 self.assertRaises(
675 self.assertRaises(
681 self.assertRaises(
687 self.assertRaises(
695 self.assertRaises(
700 self.assertRaises(
707 self.assertRaises(
751 self.assertRaises(
762 self.assertRaises(
794 self.assertRaises(
805 self.assertRaises(TypeError, codecs.register_error, 42)
806 self.assertRaises(TypeError, codecs.register_error, "test.dummy", 42)
811 self.assertRaises(TypeError, codecs.lookup_error)
816 self.assertRaises(LookupError, codecs.lookup_error, "test.unknown")
834 self.assertRaises(LookupError, b"\xff".decode, "ascii", "test.unknown")
839 self.assertRaises(TypeError, b"\xff".decode, "ascii", "test.baddecodereturn1")
840 self.assertRaises(TypeError, b"\\".decode, "unicode-escape", "test.baddecodereturn1")
841 self.assertRaises(TypeError, b"\\x0".decode, "unicode-escape", "test.baddecodereturn1")
842 self.assertRaises(TypeError, b"\\x0y".decode, "unicode-escape", "test.baddecodereturn1")
843 … self.assertRaises(TypeError, b"\\Uffffeeee".decode, "unicode-escape", "test.baddecodereturn1")
844 … self.assertRaises(TypeError, b"\\uyyyy".decode, "raw-unicode-escape", "test.baddecodereturn1")
849 self.assertRaises(TypeError, b"\xff".decode, "ascii", "test.baddecodereturn2")
864 self.assertRaises(IndexError, b"\xff0".decode, "ascii", "test.posreturn")
876 self.assertRaises(IndexError, b"\xff0".decode, "ascii", "test.posreturn")
885 self.assertRaises(UnicodeError, codecs.charmap_decode, b"\xff", "strict", {0xff: None})
886 self.assertRaises(ValueError, codecs.charmap_decode, b"\xff", "strict", D())
887 … self.assertRaises(TypeError, codecs.charmap_decode, b"\xff", "strict", {0xff: sys.maxunicode+1})
893 self.assertRaises(LookupError, "\xff".encode, "ascii", "test.unknown")
898 self.assertRaises(TypeError, "\xff".encode, "ascii", "test.badencodereturn1")
903 self.assertRaises(TypeError, "\xff".encode, "ascii", "test.badencodereturn2")
918 self.assertRaises(IndexError, "\xff0".encode, "ascii", "test.posreturn")
930 self.assertRaises(IndexError, "\xff0".encode, "ascii", "test.posreturn")
939 self.assertRaises(UnicodeError, codecs.charmap_encode, "\xff", err, {0xff: None})
940 self.assertRaises(ValueError, codecs.charmap_encode, "\xff", err, D())
941 self.assertRaises(TypeError, codecs.charmap_encode, "\xff", err, {0xff: 300})
953 self.assertRaises(ValueError, "\xff".translate, {0xff: sys.maxunicode+1})
954 self.assertRaises(TypeError, "\xff".translate, {0xff: ()})
988 with self.assertRaises(TypeError):
1071 self.assertRaises(TypeError, handler, FakeUnicodeError())
1076 with self.assertRaises((TypeError, FakeUnicodeError)):