From 02524629f39bb70f4ea00ab8e64d694e08719227 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 2 Dec 2010 18:06:51 +0000 Subject: #7475: add (un)transform method to bytes/bytearray and str, add back codecs that can be used with them from Python 2. --- Lib/test/test_bytes.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Lib/test/test_bytes.py') diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index 24ee487019..49b50f250d 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -207,6 +207,11 @@ class BaseBytesTest(unittest.TestCase): self.assertEqual(b.decode(errors="ignore", encoding="utf8"), "Hello world\n") + def test_transform(self): + b1 = self.type2test(range(256)) + b2 = b1.transform("base64").untransform("base64") + self.assertEqual(b2, b1) + def test_from_int(self): b = self.type2test(0) self.assertEqual(b, self.type2test()) -- cgit v1.2.1