Merged revisions 74316,74335 via svnmerge from

svn+ssh://svn.python.org/python/branches/py3k

........
  r74316 | alexandre.vassalotti | 2009-08-05 01:19:13 +0200 (Mi, 05 Aug 2009) | 4 lines

  Issue 5449: Fix io.BytesIO to not accept arbitrary keywords

  Patch contributed by Erick Tryzelaar.
........
  r74335 | philip.jenvey | 2009-08-06 22:00:08 +0200 (Do, 06 Aug 2009) | 1 line

  typo
........
This commit is contained in:
Georg Brandl 2009-08-13 08:35:19 +00:00
parent c5605dffdb
commit 97b28f8437
3 changed files with 8 additions and 2 deletions

View file

@ -416,6 +416,10 @@ 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 PyStringIOTest(MemoryTestMixin, MemorySeekTestMixin, unittest.TestCase):
buftype = str