@@ -1004,70 +1004,6 @@ def test_et_hash(self):
10041004 buf = bytearray ()
10051005 self .assertRaises (ValueError , getargs_et_hash , 'abc\xe9 ' , 'latin1' , buf )
10061006
1007- @support .requires_legacy_unicode_capi ()
1008- def test_u (self ):
1009- from _testcapi import getargs_u
1010- with self .assertWarns (DeprecationWarning ):
1011- self .assertEqual (getargs_u ('abc\xe9 ' ), 'abc\xe9 ' )
1012- with self .assertWarns (DeprecationWarning ):
1013- self .assertRaises (ValueError , getargs_u , 'nul:\0 ' )
1014- with self .assertWarns (DeprecationWarning ):
1015- self .assertRaises (TypeError , getargs_u , b'bytes' )
1016- with self .assertWarns (DeprecationWarning ):
1017- self .assertRaises (TypeError , getargs_u , bytearray (b'bytearray' ))
1018- with self .assertWarns (DeprecationWarning ):
1019- self .assertRaises (TypeError , getargs_u , memoryview (b'memoryview' ))
1020- with self .assertWarns (DeprecationWarning ):
1021- self .assertRaises (TypeError , getargs_u , None )
1022-
1023- @support .requires_legacy_unicode_capi ()
1024- def test_u_hash (self ):
1025- from _testcapi import getargs_u_hash
1026- with self .assertWarns (DeprecationWarning ):
1027- self .assertEqual (getargs_u_hash ('abc\xe9 ' ), 'abc\xe9 ' )
1028- with self .assertWarns (DeprecationWarning ):
1029- self .assertEqual (getargs_u_hash ('nul:\0 ' ), 'nul:\0 ' )
1030- with self .assertWarns (DeprecationWarning ):
1031- self .assertRaises (TypeError , getargs_u_hash , b'bytes' )
1032- with self .assertWarns (DeprecationWarning ):
1033- self .assertRaises (TypeError , getargs_u_hash , bytearray (b'bytearray' ))
1034- with self .assertWarns (DeprecationWarning ):
1035- self .assertRaises (TypeError , getargs_u_hash , memoryview (b'memoryview' ))
1036- with self .assertWarns (DeprecationWarning ):
1037- self .assertRaises (TypeError , getargs_u_hash , None )
1038-
1039- @support .requires_legacy_unicode_capi ()
1040- def test_Z (self ):
1041- from _testcapi import getargs_Z
1042- with self .assertWarns (DeprecationWarning ):
1043- self .assertEqual (getargs_Z ('abc\xe9 ' ), 'abc\xe9 ' )
1044- with self .assertWarns (DeprecationWarning ):
1045- self .assertRaises (ValueError , getargs_Z , 'nul:\0 ' )
1046- with self .assertWarns (DeprecationWarning ):
1047- self .assertRaises (TypeError , getargs_Z , b'bytes' )
1048- with self .assertWarns (DeprecationWarning ):
1049- self .assertRaises (TypeError , getargs_Z , bytearray (b'bytearray' ))
1050- with self .assertWarns (DeprecationWarning ):
1051- self .assertRaises (TypeError , getargs_Z , memoryview (b'memoryview' ))
1052- with self .assertWarns (DeprecationWarning ):
1053- self .assertIsNone (getargs_Z (None ))
1054-
1055- @support .requires_legacy_unicode_capi ()
1056- def test_Z_hash (self ):
1057- from _testcapi import getargs_Z_hash
1058- with self .assertWarns (DeprecationWarning ):
1059- self .assertEqual (getargs_Z_hash ('abc\xe9 ' ), 'abc\xe9 ' )
1060- with self .assertWarns (DeprecationWarning ):
1061- self .assertEqual (getargs_Z_hash ('nul:\0 ' ), 'nul:\0 ' )
1062- with self .assertWarns (DeprecationWarning ):
1063- self .assertRaises (TypeError , getargs_Z_hash , b'bytes' )
1064- with self .assertWarns (DeprecationWarning ):
1065- self .assertRaises (TypeError , getargs_Z_hash , bytearray (b'bytearray' ))
1066- with self .assertWarns (DeprecationWarning ):
1067- self .assertRaises (TypeError , getargs_Z_hash , memoryview (b'memoryview' ))
1068- with self .assertWarns (DeprecationWarning ):
1069- self .assertIsNone (getargs_Z_hash (None ))
1070-
10711007 def test_gh_99240_clear_args (self ):
10721008 from _testcapi import gh_99240_clear_args
10731009 self .assertRaises (TypeError , gh_99240_clear_args , 'a' , '\0 b' )
0 commit comments