mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue 5449: Fix io.BytesIO to not accept arbitrary keywords
Patch contributed by Erick Tryzelaar.
This commit is contained in:
parent
bbffb25c69
commit
ba5c74329d
2 changed files with 8 additions and 1 deletions
|
@ -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:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue