mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bug [ 728515 ] mmap's resize method resizes the file in win32 but not unix
This commit is contained in:
parent
76fb6d84d0
commit
38387b8b91
4 changed files with 23 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue