mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
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 ........
This commit is contained in:
parent
7a4e5866f7
commit
308d637c94
7 changed files with 29 additions and 13 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue