[issue16577] Suspect test.test_codeccallbacks.test_mutatingdecodehandler

2016-04-20 Thread Berker Peksag
Changes by Berker Peksag : -- stage: -> needs patch type: -> enhancement versions: +Python 3.6 ___ Python tracker ___

[issue16577] Suspect test.test_codeccallbacks.test_mutatingdecodehandler

2012-11-29 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc: The test created by 504084c04ac0 passes for bad reasons, at least for the second part: - test.mutating error handler is never used. - If I replace the last line of the test, it still passes, but the TypeError is raised by exc.object[:] = b (bytes are

[issue16577] Suspect test.test_codeccallbacks.test_mutatingdecodehandler

2012-11-29 Thread Walter Dörwald
Walter Dörwald added the comment: True, the second test uses the wrong error handler. And yes, you're correct, bytes are now immutable. And even if I try to decode a bytearray, what the callback gets to see is still an immutable bytes object:: import codecs def mutating(exc): if