mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Add test of resize() method of mmap objects
This commit is contained in:
parent
e0d0090e76
commit
d3cf692c38
2 changed files with 13 additions and 0 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue