mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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.
This commit is contained in:
parent
e247b46cba
commit
bc85475058
1 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue