Browse Source

bpo-34754: Fix test_flush_return_value on FreeBSD (GH-9451)

Apparently, FreeBSD doesn't raise OSError when offset is
not a multiple of mmap.PAGESIZE.
pull/9461/head
Berker Peksag 8 years ago
committed by GitHub
parent
commit
bc85475058
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      Lib/test/test_mmap.py

5
Lib/test/test_mmap.py

@ -749,8 +749,9 @@ class MmapTests(unittest.TestCase):
mm.write(b'python')
result = mm.flush()
self.assertIsNone(result)
if os.name != 'nt':
# 'offset' must be a multiple of mmap.PAGESIZE.
if sys.platform.startswith('linux'):
# 'offset' must be a multiple of mmap.PAGESIZE on Linux.
# See bpo-34754 for details.
self.assertRaises(OSError, mm.flush, 1, len(b'python'))

Loading…
Cancel
Save