Add test of resize() method of mmap objects

This commit is contained in:
Andrew M. Kuchling 2000-07-11 10:45:28 +00:00
parent e0d0090e76
commit d3cf692c38
2 changed files with 13 additions and 0 deletions

View file

@ -94,6 +94,19 @@ def test_both():
else:
assert 0, 'expected a ValueError but did not get it'
# Try resizing map
print ' Attempting resize()'
try:
m.resize( 512 )
except SystemError:
# resize() not supported
# No messages are printed, since the output of this test suite
# would then be different across platforms.
pass
else:
# resize() is supported
pass
m.close()
os.unlink("foo")
print ' Test passed'