Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d3cf692

Browse files
committed
Add test of resize() method of mmap objects
1 parent e0d0090 commit d3cf692

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

Lib/test/output/test_mmap

22 Bytes
Binary file not shown.

Lib/test/test_mmap.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,19 @@ def test_both():
9494
else:
9595
assert 0, 'expected a ValueError but did not get it'
9696

97+
# Try resizing map
98+
print ' Attempting resize()'
99+
try:
100+
m.resize( 512 )
101+
except SystemError:
102+
# resize() not supported
103+
# No messages are printed, since the output of this test suite
104+
# would then be different across platforms.
105+
pass
106+
else:
107+
# resize() is supported
108+
pass
109+
97110
m.close()
98111
os.unlink("foo")
99112
print ' Test passed'

0 commit comments

Comments
 (0)