Patch from jbalogh fixes issue #2282 (misnamed seekable() method).

This commit is contained in:
Ka-Ping Yee 2008-03-17 20:35:15 +00:00
parent e84b6336db
commit ddaa7064ee
4 changed files with 10 additions and 1 deletions

View file

@ -895,6 +895,12 @@ class TextIOWrapperTest(unittest.TestCase):
txt.seek(pos)
self.assertEquals(txt.read(4), "BBB\n")
def test_issue2282(self):
buffer = io.BytesIO(self.testdata)
txt = io.TextIOWrapper(buffer, encoding="ascii")
self.assertEqual(buffer.seekable(), txt.seekable())
def test_newline_decoder(self):
import codecs
decoder = codecs.getincrementaldecoder("utf-8")()