summaryrefslogtreecommitdiff
path: root/Lib/test/test_codecs.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2006-11-23 05:03:56 +0000
committerWalter Dörwald <walter@livinglogic.de>2006-11-23 05:03:56 +0000
commit39b8b6afb52d3e1a0e52cd8f15f6b0d3210e5d6e (patch)
treebace5769566b46dd9d099f4592d944a696005fd6 /Lib/test/test_codecs.py
parent4ebbefe677f47a8e4f624737338f22e714a7e5bc (diff)
downloadcpython-git-39b8b6afb52d3e1a0e52cd8f15f6b0d3210e5d6e.tar.gz
Change decode() so that it works with a buffer (i.e. unicode(..., 'utf-8-sig'))
SF bug #1601501.
Diffstat (limited to 'Lib/test/test_codecs.py')
-rw-r--r--Lib/test/test_codecs.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
index 5b35a64538..3c800f8777 100644
--- a/Lib/test/test_codecs.py
+++ b/Lib/test/test_codecs.py
@@ -425,6 +425,10 @@ class UTF8SigTest(ReadTest):
]
)
+ def test_bug1601501(self):
+ # SF bug #1601501: check that the codec works with a buffer
+ unicode("\xef\xbb\xbf", "utf-8-sig")
+
class EscapeDecodeTest(unittest.TestCase):
def test_empty(self):
self.assertEquals(codecs.escape_decode(""), ("", 0))