@@ -305,9 +305,9 @@ def test_str_format(self):
305
305
test_exc ('%c' , sys .maxunicode + 1 , OverflowError ,
306
306
"%c arg not in range(0x110000)" )
307
307
#test_exc('%c', 2**128, OverflowError, "%c arg not in range(0x110000)")
308
- test_exc ('%c' , 3.14 , TypeError , "%c requires an int or a unicode character, not float " )
309
- test_exc ('%c' , 'ab' , TypeError , "%c requires an int or a unicode character, not a string of length 2 " )
310
- test_exc ('%c' , b'x' , TypeError , "%c requires an int or a unicode character, not bytes " )
308
+ test_exc ('%c' , 3.14 , TypeError , "%c requires int or char " )
309
+ test_exc ('%c' , 'ab' , TypeError , "%c requires int or char " )
310
+ test_exc ('%c' , b'x' , TypeError , "%c requires int or char " )
311
311
312
312
if maxsize == 2 ** 31 - 1 :
313
313
# crashes 2.2.1 and earlier:
@@ -371,11 +371,11 @@ def __bytes__(self):
371
371
test_exc (b"%c" , 2 ** 128 , OverflowError ,
372
372
"%c arg not in range(256)" )
373
373
test_exc (b"%c" , b"Za" , TypeError ,
374
- "%c requires an integer in range(256) or a single byte, not a bytes object of length 2 " )
374
+ "%c requires an integer in range(256) or a single byte" )
375
375
test_exc (b"%c" , "Y" , TypeError ,
376
- "%c requires an integer in range(256) or a single byte, not str " )
376
+ "%c requires an integer in range(256) or a single byte" )
377
377
test_exc (b"%c" , 3.14 , TypeError ,
378
- "%c requires an integer in range(256) or a single byte, not float " )
378
+ "%c requires an integer in range(256) or a single byte" )
379
379
test_exc (b"%b" , "Xc" , TypeError ,
380
380
"%b requires a bytes-like object, "
381
381
"or an object that implements __bytes__, not 'str'" )
0 commit comments