@@ -198,6 +198,10 @@ def test_string(self):
198198 self .assertIs ("xyz" .isdigit (), False )
199199 self .assertIs ("xyz" .islower (), True )
200200 self .assertIs ("XYZ" .islower (), False )
201+ self .assertIs ("0123" .isdecimal (), True )
202+ self .assertIs ("xyz" .isdecimal (), False )
203+ self .assertIs ("0123" .isnumeric (), True )
204+ self .assertIs ("xyz" .isnumeric (), False )
201205 self .assertIs (" " .isspace (), True )
202206 self .assertIs ("XYZ" .isspace (), False )
203207 self .assertIs ("X" .istitle (), True )
@@ -207,30 +211,6 @@ def test_string(self):
207211 self .assertIs ("xyz" .startswith ("x" ), True )
208212 self .assertIs ("xyz" .startswith ("z" ), False )
209213
210- if test_support .have_unicode :
211- self .assertIs (str ("xyz" , 'ascii' ).endswith (str ("z" , 'ascii' )), True )
212- self .assertIs (str ("xyz" , 'ascii' ).endswith (str ("x" , 'ascii' )), False )
213- self .assertIs (str ("xyz0123" , 'ascii' ).isalnum (), True )
214- self .assertIs (str ("@#$%" , 'ascii' ).isalnum (), False )
215- self .assertIs (str ("xyz" , 'ascii' ).isalpha (), True )
216- self .assertIs (str ("@#$%" , 'ascii' ).isalpha (), False )
217- self .assertIs (str ("0123" , 'ascii' ).isdecimal (), True )
218- self .assertIs (str ("xyz" , 'ascii' ).isdecimal (), False )
219- self .assertIs (str ("0123" , 'ascii' ).isdigit (), True )
220- self .assertIs (str ("xyz" , 'ascii' ).isdigit (), False )
221- self .assertIs (str ("xyz" , 'ascii' ).islower (), True )
222- self .assertIs (str ("XYZ" , 'ascii' ).islower (), False )
223- self .assertIs (str ("0123" , 'ascii' ).isnumeric (), True )
224- self .assertIs (str ("xyz" , 'ascii' ).isnumeric (), False )
225- self .assertIs (str (" " , 'ascii' ).isspace (), True )
226- self .assertIs (str ("XYZ" , 'ascii' ).isspace (), False )
227- self .assertIs (str ("X" , 'ascii' ).istitle (), True )
228- self .assertIs (str ("x" , 'ascii' ).istitle (), False )
229- self .assertIs (str ("XYZ" , 'ascii' ).isupper (), True )
230- self .assertIs (str ("xyz" , 'ascii' ).isupper (), False )
231- self .assertIs (str ("xyz" , 'ascii' ).startswith (str ("x" , 'ascii' )), True )
232- self .assertIs (str ("xyz" , 'ascii' ).startswith (str ("z" , 'ascii' )), False )
233-
234214 def test_boolean (self ):
235215 self .assertEqual (True & 1 , 1 )
236216 self .assert_ (not isinstance (True & 1 , bool ))
0 commit comments