mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +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
Binary file not shown.
|
@ -94,6 +94,19 @@ def test_both():
|
||||||
else:
|
else:
|
||||||
assert 0, 'expected a ValueError but did not get it'
|
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()
|
m.close()
|
||||||
os.unlink("foo")
|
os.unlink("foo")
|
||||||
print ' Test passed'
|
print ' Test passed'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue