https://github.com/python/cpython/commit/695b1dd8cbf3a48fdb30ab96918a49b20b7ec3e7 commit: 695b1dd8cbf3a48fdb30ab96918a49b20b7ec3e7 branch: master author: Antoine Pitrou <antoine at python.org> committer: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> date: 2019年05月27日T10:57:23-07:00 summary: bpo-32941: Fix test_madvise failure when page size >= 8kiB (GH-13596) https://bugs.python.org/issue32941 files: M Lib/test/test_mmap.py diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py index 7b2b100dce01..88c501d81a07 100644 --- a/Lib/test/test_mmap.py +++ b/Lib/test/test_mmap.py @@ -13,6 +13,7 @@ PAGESIZE = mmap.PAGESIZE + class MmapTests(unittest.TestCase): def setUp(self): @@ -741,7 +742,7 @@ def test_flush_return_value(self): @unittest.skipUnless(hasattr(mmap.mmap, 'madvise'), 'needs madvise') def test_madvise(self): - size = 8192 + size = 2 * PAGESIZE m = mmap.mmap(-1, size) with self.assertRaisesRegex(ValueError, "madvise start out of bounds"):