def test_seeking_from_end_beyond_beginning(self):
with EncodedFile(io.BytesIO(COMPRESSED)) as fp:
# Go to end to get size
size = fp.seek(0, io.SEEK_END)
# Go to beginning
self.assertNotRaises(fp.seek, -size, io.SEEK_END)
# One before beginning
self.assertRaises(IOError, fp.seek, -size - 1, io.SEEK_END)
评论列表
文章目录