summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2005-08-24 07:17:40 +0000
committerGeorg Brandl <georg@python.org>2005-08-24 07:17:40 +0000
commit38387b8b910beeea9c6c2ed6c7b1bd26724bd813 (patch)
tree2dd64e20abe6477fa895c7ca8cd9acd086725203 /Lib/test
parent76fb6d84d08c636a51073c5a51b93db14b06555e (diff)
downloadcpython-git-38387b8b910beeea9c6c2ed6c7b1bd26724bd813.tar.gz
bug [ 728515 ] mmap's resize method resizes the file in win32 but not unix
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_mmap.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py
index efb7180f5f..a0386ef005 100644
--- a/Lib/test/test_mmap.py
+++ b/Lib/test/test_mmap.py
@@ -120,6 +120,14 @@ def test_both():
else:
verify(0, 'Could seek beyond the new size')
+ # Check that the underlying file is truncated too
+ # (bug #728515)
+ f = open(TESTFN)
+ f.seek(0, 2)
+ verify(f.tell() == 512, 'Underlying file not truncated')
+ f.close()
+ verify(m.size() == 512, 'New size not reflected in file')
+
m.close()
finally: