From ba5c74329dadfb685bb921407916ffbb2efb78cc Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Tue, 4 Aug 2009 23:19:13 +0000 Subject: Issue 5449: Fix io.BytesIO to not accept arbitrary keywords Patch contributed by Erick Tryzelaar. --- Lib/test/test_memoryio.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Lib/test/test_memoryio.py') diff --git a/Lib/test/test_memoryio.py b/Lib/test/test_memoryio.py index 7dd1658ca4..6ab83282fe 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: -- cgit v1.2.1