Commit 00409b83 authored by Mark Hammond's avatar Mark Hammond

Test that after resizing the mmap'd file, we can't seek beyond the new size.

parent a91faa61
......@@ -105,7 +105,14 @@ def test_both():
pass
else:
# resize() is supported
pass
assert len(m) == 512, "len(m) is %d, but expecting 512" % (len(m),)
# Check that we can no longer seek beyond the new size.
try:
m.seek(513,0)
except ValueError:
pass
else:
assert 0, 'Could seek beyond the new size'
m.close()
os.unlink("foo")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment