Skip to content

Commit bc85475

Browse files
authored
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.
1 parent e247b46 commit bc85475

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_mmap.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,9 @@ def test_flush_return_value(self):
749749
mm.write(b'python')
750750
result = mm.flush()
751751
self.assertIsNone(result)
752-
if os.name != 'nt':
753-
# 'offset' must be a multiple of mmap.PAGESIZE.
752+
if sys.platform.startswith('linux'):
753+
# 'offset' must be a multiple of mmap.PAGESIZE on Linux.
754+
# See bpo-34754 for details.
754755
self.assertRaises(OSError, mm.flush, 1, len(b'python'))
755756

756757

0 commit comments

Comments
 (0)