summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_memoryio.py
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2009-08-04 23:19:13 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2009-08-04 23:19:13 (GMT)
commitba5c74329dadfb685bb921407916ffbb2efb78cc (patch)
tree87cb09d927b70eda261d80b064285dc3b0aec752 /Lib/test/test_memoryio.py
parentbbffb25c69f748a8842bb16718d79b86ad16b867 (diff)
downloadcpython-ba5c74329dadfb685bb921407916ffbb2efb78cc.zip
cpython-ba5c74329dadfb685bb921407916ffbb2efb78cc.tar.gz
cpython-ba5c74329dadfb685bb921407916ffbb2efb78cc.tar.bz2
Issue 5449: Fix io.BytesIO to not accept arbitrary keywords
Patch contributed by Erick Tryzelaar.
Diffstat (limited to 'Lib/test/test_memoryio.py')
-rw-r--r--Lib/test/test_memoryio.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_memoryio.py b/Lib/test/test_memoryio.py
index 7dd1658..6ab8328 100644
--- a/Lib/test/test_memoryio.py
+++ b/Lib/test/test_memoryio.py
@@ -461,6 +461,11 @@ class PyBytesIOTest(MemoryTestMixin, MemorySeekTestMixin, unittest.TestCase):
self.assertEqual(memio.write(a), 10)
self.assertEqual(memio.getvalue(), buf)
+ def test_issue5449(self):
+ buf = self.buftype("1234567890")
+ self.ioclass(initial_bytes=buf)
+ self.assertRaises(TypeError, self.ioclass, buf, foo=None)
+
class TextIOTestMixin: