@@ -715,7 +715,6 @@ def test_badbom(self):
715715 f = codecs .getreader (self .encoding )(s )
716716 self .assertRaises (UnicodeDecodeError , f .read )
717717
718- @unittest .expectedFailure # TODO: RUSTPYTHON; UnicodeDecodeError: 'utf-16' codec can't decode bytes in position 0-1: unexpected end of data
719718 def test_partial (self ):
720719 self .check_partial (
721720 "\x00 \xff \u0100 \uffff \U00010000 " ,
@@ -737,7 +736,6 @@ def test_partial(self):
737736 ]
738737 )
739738
740- @unittest .expectedFailure # TODO: RUSTPYTHON; IndexError: index out of range
741739 def test_handlers (self ):
742740 self .assertEqual (('\ufffd ' , 1 ),
743741 codecs .utf_16_decode (b'\x01 ' , 'replace' , True ))
@@ -781,7 +779,6 @@ def test_invalid_modes(self):
781779 self .assertIn ("can't have text and binary mode at once" ,
782780 str (cm .exception ))
783781
784- @unittest .expectedFailure # TODO: RUSTPYTHON; IndexError: index out of range
785782 def test_incremental_surrogatepass (self ):
786783 return super ().test_incremental_surrogatepass ()
787784
@@ -791,7 +788,6 @@ class UTF16LETest(ReadTest, unittest.TestCase):
791788 encoding = "utf-16-le"
792789 ill_formed_sequence = b"\x80 \xdc "
793790
794- @unittest .expectedFailure # TODO: RUSTPYTHON; UnicodeDecodeError: 'utf-16' codec can't decode bytes in position 0-1: unexpected end of data
795791 def test_partial (self ):
796792 self .check_partial (
797793 "\x00 \xff \u0100 \uffff \U00010000 " ,
@@ -832,7 +828,6 @@ def test_nonbmp(self):
832828 self .assertEqual (b'\x00 \xd8 \x03 \xde ' .decode (self .encoding ),
833829 "\U00010203 " )
834830
835- @unittest .expectedFailure # TODO: RUSTPYTHON; IndexError: index out of range
836831 def test_incremental_surrogatepass (self ):
837832 return super ().test_incremental_surrogatepass ()
838833
@@ -841,7 +836,6 @@ class UTF16BETest(ReadTest, unittest.TestCase):
841836 encoding = "utf-16-be"
842837 ill_formed_sequence = b"\xdc \x80 "
843838
844- @unittest .expectedFailure # TODO: RUSTPYTHON; UnicodeDecodeError: 'utf-16' codec can't decode bytes in position 0-1: unexpected end of data
845839 def test_partial (self ):
846840 self .check_partial (
847841 "\x00 \xff \u0100 \uffff \U00010000 " ,
@@ -882,7 +876,6 @@ def test_nonbmp(self):
882876 self .assertEqual (b'\xd8 \x00 \xde \x03 ' .decode (self .encoding ),
883877 "\U00010203 " )
884878
885- @unittest .expectedFailure # TODO: RUSTPYTHON; UnicodeDecodeError: 'utf-16' codec can't decode bytes in position 0-1: unexpected end of data
886879 def test_incremental_surrogatepass (self ):
887880 return super ().test_incremental_surrogatepass ()
888881
@@ -1010,7 +1003,6 @@ def test_ascii(self):
10101003 b'+AAAAAQACAAMABAAFAAYABwAIAAsADAAOAA8AEAARABIAEwAU'
10111004 b'ABUAFgAXABgAGQAaABsAHAAdAB4AHwBcAH4Afw-' )
10121005
1013- @unittest .expectedFailure # TODO: RUSTPYTHON; TypeError: expected at least 5 arguments, got 1
10141006 def test_partial (self ):
10151007 self .check_partial (
10161008 'a+-b\x00 c\x80 d\u0100 e\U00010000 f' ,
@@ -1115,11 +1107,9 @@ def test_lone_surrogates(self):
11151107 with self .subTest (raw = raw ):
11161108 self .assertEqual (raw .decode ('utf-7' , 'replace' ), expected )
11171109
1118- @unittest .expectedFailure # TODO: RUSTPYTHON; TypeError: expected at least 5 arguments, got 1
11191110 def test_readline (self ):
11201111 return super ().test_readline ()
11211112
1122- @unittest .expectedFailure # TODO: RUSTPYTHON; TypeError: utf_7_decode() takes from 1 to 2 positional arguments but 3 were given
11231113 def test_incremental_surrogatepass (self ):
11241114 return super ().test_incremental_surrogatepass ()
11251115
@@ -3475,7 +3465,7 @@ def check_encode(self, cp, tests):
34753465 self .assertRaises (UnicodeEncodeError ,
34763466 text .encode , f'cp{ cp } ' , errors )
34773467
3478- @expectedFailure # TODO: RUSTPYTHON
3468+ @unittest . expectedFailure # TODO: RUSTPYTHON
34793469 def test_cp932 (self ):
34803470 self .check_encode (932 , (
34813471 ('abc' , 'strict' , b'abc' ),
@@ -3583,6 +3573,7 @@ def test_cp20106(self):
35833573 (b'(\xbf )' , 'surrogatepass' , None ),
35843574 ))
35853575
3576+ @unittest .expectedFailure # TODO: RUSTPYTHON # TODO: RUSTPYTHON
35863577 def test_cp_utf7 (self ):
35873578 cp = 65000
35883579 self .check_encode (cp , (
0 commit comments