summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bytes.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-09-18 21:42:35 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-09-18 21:42:35 (GMT)
commit308d637c94b9ed88c386b83891ad38b2131ebd12 (patch)
treeda0e7c3d9999e3c0a3dbc02fb4be7fbffba5ed7e /Lib/test/test_bytes.py
parent7a4e5866f70ccbb76dae6e0139f5ddba8bc5761a (diff)
downloadcpython-308d637c94b9ed88c386b83891ad38b2131ebd12.zip
cpython-308d637c94b9ed88c386b83891ad38b2131ebd12.tar.gz
cpython-308d637c94b9ed88c386b83891ad38b2131ebd12.tar.bz2
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.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py
index dd01b93..ad11686 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)