diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2005-12-18 03:34:22 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2005-12-18 03:34:22 +0000 |
commit | fcd149ef363ada42b62a8f6d5af35020407f2086 (patch) | |
tree | 501bf46cc06055a5ba807ad0f7c66bd5338ca9a8 /Lib/test/test_mmap.py | |
parent | 6b78b9dda07fc12df4fe23b80073c5c25124a080 (diff) | |
download | cpython-fcd149ef363ada42b62a8f6d5af35020407f2086.tar.gz |
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 0b9cea9214..849f170795 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() |