STINNER Victor <[email protected]> added the comment:
We can use the following function to check if the filesystem does support
sparse files:
def support_sparse_file(directory):
import tempfile
with tempfile.NamedTemporaryFile(dir=directory) as tmpfile:
# Create a file with a size of 1 byte but without content
# (only zeros)
with open(tmpfile.name, "wb") as f:
f.truncate(1)
filestat = os.stat(tmpfile.name)
return (filestat.st_blocks == 0)
We may skip the test if the filesystem doesn't support sparse file... But I
think that it is already the purpose of the "largefile" resource.
If this issue is not a bug, but just that the timeout is too low, we should use
a bigger timeout on this specific buildbot.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11779>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com