Issue #22406: Fixed the uu_codec codec incorrectly ported to 3.x.

Based on patch by Martin Panter.
This commit is contained in:
Serhiy Storchaka 2014-11-07 14:04:37 +02:00
parent e66bb96929
commit 519114df42
4 changed files with 30 additions and 1 deletions

View file

@ -2563,6 +2563,10 @@ class TransformCodecTest(unittest.TestCase):
info = codecs.lookup(alias)
self.assertEqual(info.name, expected_name)
def test_uu_invalid(self):
# Missing "begin" line
self.assertRaises(ValueError, codecs.decode, b"", "uu-codec")
# The codec system tries to wrap exceptions in order to ensure the error
# mentions the operation being performed and the codec involved. We