Message80365
"Fixing" multibytecodec.c produces a TypeError in the following test:
def test_errorcallback_longindex(self):
dec = codecs.getdecoder('euc-kr')
myreplace = lambda exc: ('', sys.maxsize+1)
codecs.register_error('test.cjktest', myreplace)
self.assertRaises(IndexError, dec,
'apple\x92ham\x93spam', 'test.cjktest')
TypeError: decode() argument 1 must be bytes or buffer, not str
Since the test is meant to test recovery from a misbehaving callback, I
guess the type of the input string is not really important and can be
changed to a bytes string instead. What do you think?
(in any case, here is a patch) |
|
Date |
User |
Action |
Args |
2009-01-22 11:05:12 | pitrou | set | recipients:
+ pitrou, lemburg, amaury.forgeotdarc, vstinner |
2009-01-22 11:05:11 | pitrou | set | messageid: <1232622311.46.0.32785075646.issue4874@psf.upfronthosting.co.za> |
2009-01-22 11:04:50 | pitrou | link | issue4874 messages |
2009-01-22 11:04:49 | pitrou | create | |
|