diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2005-12-18 03:34:22 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2005-12-18 03:34:22 (GMT) |
commit | 8856fb750b3417fc4770ad70cce56b4aad61c225 (patch) | |
tree | 76d2a3c73215958c035da7fb01ec21bfab86c1c6 /Lib/test/test_mmap.py | |
parent | 84456bdab35ea8a4c75eeaee6f3320c8c4280007 (diff) | |
download | cpython-8856fb750b3417fc4770ad70cce56b4aad61c225.zip cpython-8856fb750b3417fc4770ad70cce56b4aad61c225.tar.gz cpython-8856fb750b3417fc4770ad70cce56b4aad61c225.tar.bz2 |
SF Patch #1365916, mmap fails on AMD64
Fix some 64-bit issues due to mismatch format characters w/actual data types
Diffstat (limited to 'Lib/test/test_mmap.py')
-rw-r--r-- | Lib/test/test_mmap.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py index 0b9cea9..849f170 100644 --- a/Lib/test/test_mmap.py +++ b/Lib/test/test_mmap.py @@ -356,6 +356,22 @@ def test_both(): finally: os.unlink(TESTFN) + # make move works everywhere (64-bit format problem earlier) + f = open(TESTFN, 'w+') + + try: # unlink TESTFN no matter what + f.write("ABCDEabcde") # Arbitrary character + f.flush() + + mf = mmap.mmap(f.fileno(), 10) + mf.move(5, 0, 5) + verify(mf[:] == "ABCDEABCDE", "Map move should have duplicated front 5") + mf.close() + f.close() + + finally: + os.unlink(TESTFN) + print ' Test passed' test_both() |