parent
640012103c
commit
a41ccf0356
3 changed files with 18 additions and 5 deletions
|
@ -88,6 +88,14 @@ class TestLimitingStream(unittest.TestCase):
|
|||
self.assertEquals('', stream.read(1))
|
||||
self.assertEquals(stream.tell(), 3)
|
||||
|
||||
def test_seek_to_tell(self):
|
||||
fileobj = StringIO('this is a cool test')
|
||||
stream = LimitingStream(fileobj, 3)
|
||||
stream.seek(stream.tell())
|
||||
|
||||
self.assertEquals('thi', stream.read(4))
|
||||
self.assertEquals(stream.tell(), 3)
|
||||
|
||||
|
||||
class TestStreamSlice(unittest.TestCase):
|
||||
def test_none_read(self):
|
||||
|
|
Reference in a new issue