diff options
author | Georg Brandl <georg@python.org> | 2010-12-02 18:06:51 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-12-02 18:06:51 (GMT) |
commit | 02524629f39bb70f4ea00ab8e64d694e08719227 (patch) | |
tree | de93598f38e1b4d84eaa743b31df1a79a21c957c /Lib/test/test_bytes.py | |
parent | de0ab5eab31c9ea9a628718778b0dc57df0d8470 (diff) | |
download | cpython-02524629f39bb70f4ea00ab8e64d694e08719227.zip cpython-02524629f39bb70f4ea00ab8e64d694e08719227.tar.gz cpython-02524629f39bb70f4ea00ab8e64d694e08719227.tar.bz2 |
#7475: add (un)transform method to bytes/bytearray and str, add back codecs that can be used with them from Python 2.
Diffstat (limited to 'Lib/test/test_bytes.py')
-rw-r--r-- | Lib/test/test_bytes.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index 24ee487..49b50f2 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()) |