diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-09-18 21:42:35 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-09-18 21:42:35 +0000 |
commit | 15353151849ff5a24919d80eae1636f950346b05 (patch) | |
tree | c3ff2960c952903d0093822b2a9c41af9ec675e5 /Lib/test/test_bytes.py | |
parent | 20280921e21d33023c4a202914ea2c0bd8973374 (diff) | |
download | cpython-15353151849ff5a24919d80eae1636f950346b05.tar.gz |
Merged revisions 74929 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r74929 | benjamin.peterson | 2009-09-18 16:14:55 -0500 (Fri, 18 Sep 2009) | 1 line
add keyword arguments support to str/unicode encode and decode #6300
........
Diffstat (limited to 'Lib/test/test_bytes.py')
-rw-r--r-- | Lib/test/test_bytes.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index dd01b936b2..ad11686fce 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -186,6 +186,8 @@ class BaseBytesTest(unittest.TestCase): b = self.type2test(sample, "latin1") self.assertRaises(UnicodeDecodeError, b.decode, "utf8") self.assertEqual(b.decode("utf8", "ignore"), "Hello world\n") + self.assertEqual(b.decode(errors="ignore", encoding="utf8"), + "Hello world\n") def test_from_int(self): b = self.type2test(0) |