diff options
author | Martin Panter <vadmium> | 2015-09-12 01:22:17 (GMT) |
---|---|---|
committer | Martin Panter <vadmium> | 2015-09-12 01:22:17 (GMT) |
commit | 9ab96946eef86d2fc0e54262ee7c44f3d5dc3d39 (patch) | |
tree | 3b3abc3f73c2675e0e7fb700f23ea6704cdda4fb /Lib/test/test_codecs.py | |
parent | 3133a9f5ab0eac7e21a13b9fa10356d6c830f83c (diff) | |
parent | 06171bd52a02173910d7ab8082850bbed0db1410 (diff) | |
download | cpython-9ab96946eef86d2fc0e54262ee7c44f3d5dc3d39.zip cpython-9ab96946eef86d2fc0e54262ee7c44f3d5dc3d39.tar.gz cpython-9ab96946eef86d2fc0e54262ee7c44f3d5dc3d39.tar.bz2 |
Issue #16473: Merge codecs doc and test from 3.4 into 3.5
Diffstat (limited to 'Lib/test/test_codecs.py')
-rw-r--r-- | Lib/test/test_codecs.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index eab07c9..a4a6f95 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -2684,6 +2684,14 @@ class TransformCodecTest(unittest.TestCase): info = codecs.lookup(alias) self.assertEqual(info.name, expected_name) + def test_quopri_stateless(self): + # Should encode with quotetabs=True + encoded = codecs.encode(b"space tab\teol \n", "quopri-codec") + self.assertEqual(encoded, b"space=20tab=09eol=20\n") + # But should still support unescaped tabs and spaces + unescaped = b"space tab eol\n" + self.assertEqual(codecs.decode(unescaped, "quopri-codec"), unescaped) + def test_uu_invalid(self): # Missing "begin" line self.assertRaises(ValueError, codecs.decode, b"", "uu-codec") |