From 38387b8b910beeea9c6c2ed6c7b1bd26724bd813 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 24 Aug 2005 07:17:40 +0000 Subject: bug [ 728515 ] mmap's resize method resizes the file in win32 but not unix --- Lib/test/test_mmap.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Lib/test') 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: -- cgit v1.2.1