Alex Gaynor <[email protected]> added the comment:
Very slightly more reduced:
import os
from tempfile import TemporaryFile
CHUNK_SIZE = 25
with TemporaryFile('r+w') as f:
f.write('123456789x12345678><123456789\n')
f.seek(0, os.SEEK_END)
f.seek(-CHUNK_SIZE, os.SEEK_CUR)
f.read(CHUNK_SIZE)
f.seek(-CHUNK_SIZE, os.SEEK_CUR)
f.tell()
try:
f.seek(-CHUNK_SIZE, os.SEEK_CUR)
except IOError:
pass
else:
raise AssertionError("Didn't raise IOError")
print f.tell()
----------
status: unread -> chatting
________________________________________
PyPy bug tracker <[email protected]>
<https://bugs.pypy.org/issue1582>
________________________________________
_______________________________________________
pypy-issue mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-issue