Merge pull request #1638 from coreos-inc/swift-retry-seek

Add retry support to Swift
This commit is contained in:
josephschorr 2016-08-01 14:04:54 -04:00 committed by GitHub
commit b0bffe56ca
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):

View file

@ -1,8 +1,6 @@
import unittest
import os
from StringIO import StringIO
from util.registry.queueprocess import QueueResult
from util.registry.queuefile import QueueFile