diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-09-18 21:46:21 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-09-18 21:46:21 +0000 |
commit | dc782b55f2c7ede13c8c2bbc76662e8a9784d20c (patch) | |
tree | 239b0ddea738d13ce6d6e5ad0e82eaf0f4007c8d /Lib/test/test_bytes.py | |
parent | 579a358e61292774a9ab57fe7e92441777e48be4 (diff) | |
download | cpython-git-dc782b55f2c7ede13c8c2bbc76662e8a9784d20c.tar.gz |
backport keyword argument support for bytearray.decode
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 615c955750..6257455c8a 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) |