summaryrefslogtreecommitdiff
path: root/Lib/test/test_bytes.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-09-18 21:46:21 +0000
committerBenjamin Peterson <benjamin@python.org>2009-09-18 21:46:21 +0000
commitdc782b55f2c7ede13c8c2bbc76662e8a9784d20c (patch)
tree239b0ddea738d13ce6d6e5ad0e82eaf0f4007c8d /Lib/test/test_bytes.py
parent579a358e61292774a9ab57fe7e92441777e48be4 (diff)
downloadcpython-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.py2
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)