@@ -3081,12 +3081,12 @@ def test_strptime(self):
30813081 with self .assertRaises (ValueError ): strptime ("z" , "%z" )
30823082
30833083 # test only ascii is allowed
3084- with self .assertRaises (ValueError ): strptime ('٢025-0٢-٢9 ' , '%Y-%m-%d' )
3085- with self .assertRaises (ValueError ): strptime ('1٢:02:٢7 ' , '%H:%M:%S' )
3084+ with self .assertRaises (ValueError ): strptime ('٢025-02-2٢ ' , '%Y-%m-%d' )
3085+ with self .assertRaises (ValueError ): strptime ('1٢:0٢:0٢ ' , '%H:%M:%S' )
30863086 with self .assertRaises (ValueError ): strptime ('٢5' , '%y' )
3087- with self .assertRaises (ValueError ): strptime ('٢555' , '%G' )
3088- with self .assertRaises (ValueError ): strptime ('٢/0٢ 0٢a٢ ' , '%j/%y %I%p:%M:%S ' )
3089- with self .assertRaises (ValueError ): strptime ('0٢/٢/200٢ ' , '%U/%V ' )
3087+ with self .assertRaises (ValueError ): strptime ('٢555 1٢ 1 ' , '%G %V %u ' )
3088+ with self .assertRaises (ValueError ): strptime ('1٢/٢5 02AM ' , '%j/%y %I%p' )
3089+ with self .assertRaises (ValueError ): strptime ('1٢ ' , '%U' )
30903090
30913091 def test_strptime_ampm (self ):
30923092 dt = datetime (1999 , 3 , 17 , 0 , 44 , 55 , 2 )
@@ -4299,7 +4299,7 @@ def test_strptime_tz(self):
42994299 self .assertEqual (strptime ("UTC" , "%Z" ).tzinfo , None )
43004300
43014301 def test_strptime_errors (self ):
4302- for tzstr in ("-2400" , "-000" , "z" , "24:00" , "٢ " ):
4302+ for tzstr in ("-2400" , "-000" , "z" , "24:00" , "+0٢:00 " ):
43034303 with self .assertRaises (ValueError ):
43044304 self .theclass .strptime (tzstr , "%z" )
43054305 with self .assertRaises (ValueError ):
0 commit comments