mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
backport keyword argument support for bytearray.decode
This commit is contained in:
parent
579a358e61
commit
dc782b55f2
2 changed files with 6 additions and 3 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