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:06:19 +02:00
commit 85e7066278
4 changed files with 30 additions and 1 deletions

View file

@ -2571,6 +2571,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