Skip to content

Commit

Permalink
Merge ac993d3 into 392abb4
Browse files Browse the repository at this point in the history
  • Loading branch information
xhochy committed Jul 11, 2018
2 parents 392abb4 + ac993d3 commit 8e9e05a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions simplekv/net/azurestore.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ def seek(self, offset, whence=0):
if self.size + offset < 0:
raise IOError('seek would move position outside the file')
self.pos = self.size + offset
return self.pos

def seekable(self):
return True
Expand Down
4 changes: 2 additions & 2 deletions tests/basic_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,9 @@ def test_open_seek_and_tell_empty_value(self, store, key):
store.put(key, value)
ok = store.open(key)
assert ok.seekable()
ok.seek(10)
assert ok.seek(10) == 10
assert ok.tell() == 10
ok.seek(-6, 1)
assert ok.seek(-6, 1) == 4
assert ok.tell() == 4
with pytest.raises(IOError):
ok.seek(-1, 0)
Expand Down

0 comments on commit 8e9e05a

Please sign in to comment.