Add retry support to Swift

Fixes #1636
This commit is contained in:
Joseph Schorr 2016-07-20 17:30:53 -04:00
parent 640012103c
commit a41ccf0356
3 changed files with 18 additions and 5 deletions

View file

@ -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):