1313def testformat (formatstr , args , output = None ):
1414 if verbose :
1515 if output :
16- print ("%s %% %s =? %s ..." % \
17- (repr ( formatstr ), repr ( args ), repr ( output ) ), end = ' ' )
16+ print ("%r %% %r =? %r ..." % \
17+ (formatstr , args , output ), end = ' ' )
1818 else :
19- print ("%s %% %s works? ..." % (repr ( formatstr ), repr ( args ) ), end = ' ' )
19+ print ("%r %% %r works? ..." % (formatstr , args ), end = ' ' )
2020 try :
2121 result = formatstr % args
2222 except OverflowError :
@@ -28,8 +28,8 @@ def testformat(formatstr, args, output=None):
2828 if output and result != output :
2929 if verbose :
3030 print ('no' )
31- print ("%s %% %s == %s != %s " % \
32- (repr ( formatstr ), repr ( args ), repr ( result ), repr ( output ) ))
31+ print ("%r %% %r == %r != %r " % \
32+ (formatstr , args , result , output ))
3333 else :
3434 if verbose :
3535 print ('yes' )
@@ -222,7 +222,7 @@ def __oct__(self):
222222 return self + 1
223223
224224test_exc ('%o' , Foobar (), TypeError ,
225- "expected str object , int found" )
225+ "expected string , int found" )
226226
227227if maxsize == 2 ** 31 - 1 :
228228 # crashes 2.2.1 and earlier:
0 commit comments