diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py index d513810b35b..246fdf01f9c 100644 --- a/Lib/test/test_mmap.py +++ b/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'))