summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode.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_unicode.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_unicode.py')
-rw-r--r--Lib/test/test_unicode.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 7f87b43..66368f4 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -955,6 +955,10 @@ class UnicodeTest(
self.assertRaises(UnicodeError, 'Andr\202 x'.encode, 'ascii','strict')
self.assertEqual('Andr\202 x'.encode('ascii','ignore'), b"Andr x")
self.assertEqual('Andr\202 x'.encode('ascii','replace'), b"Andr? x")
+ self.assertEqual('Andr\202 x'.encode('ascii', 'replace'),
+ 'Andr\202 x'.encode('ascii', errors='replace'))
+ self.assertEqual('Andr\202 x'.encode('ascii', 'ignore'),
+ 'Andr\202 x'.encode(encoding='ascii', errors='ignore'))
# Error handling (decoding)
self.assertRaises(UnicodeError, str, b'Andr\202 x', 'ascii')