Issue #11277: mmap calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get around a
mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso.
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
index 48ac40a..7593c06 100644
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -74,7 +74,7 @@
with open(support.TESTFN, "wb+") as f:
f.seek(_4G)
f.write(b"asdf")
- with open(support.TESTFN, "rb") as f:
+ f.flush()
self.mapping = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
def tearDown(self):